* Make nix flake respect unused grammars
* Use default value
* Refactor
* Take use-grammars.only into account
---------
Co-authored-by: Sebastian Zivota <sebastian.zivota@mailbox.org>
Sourcehut has outages occasionally that cause the CI and from-source
builds to fail. It also doesn't setup redirects when a user renames
themselves, so if a user that publishes a tree-sitter grammar we use
changes their sourcehut name then it breaks the build and any prior
builds using that grammar.
For now let's remove them from the default build. It's a bandaid over
a larger reliability and trust problem with the grammar repositories
but it should fix the build for now.
* info: no grammar compile
Added instructions on how to compile without compiling grammars
* Update book/src/install.md
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
---------
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
Make the pluralization of files and selections consistent to emphasize
the 1-to-1 relation between files and selections. The prior wording
with plural "files" and singular "selection" can mislead users into
thinking the command can open multiple files from a single selection.
* Add HOCON language support
* Remove error query
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
* Change include query
* Fix query error
---------
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
Currently, typing a single quote in a `.scm` file "helpfully" auto-
completes a closing quote. This is because there is no auto-pairs
section in the languages.toml. This commit adds that.
* Reduce logo.svg even more
While reading through commits to helix I saw
https://github.com/helix-editor/helix/pull/9106 and wondered if the
relatively-new-to-me svgo would do better than -95B diff, indeed it
does. Seeing as this file is "a minified file we're basically treating
as binary" anyway I figured might as well minify it further.
* Minimize all the svg logos
Enum variants and (tuple) structs are indistinguishable in general, so we
mark any PascalCase pattern or expression as a "constructor", which
covers all three.
Diagnostics are currently extended if text is inserted at their end. This is
desirable when inserting text after an identifier. For example consider:
let foo = 2;
--- unused variable
Renaming the identifier should extend the diagnostic:
let foobar = 2;
------ unused variable
This is currently implemented in helix but as a consequence adding whitespaces
or a type hint also extends the diagnostic:
let foo = 2;
-------- unused variable
let foo: Bar = 2;
-------- unused variable
In these cases the diagnostic should remain unchanged:
let foo = 2;
--- unused variable
let foo: Bar = 2;
--- unused variable
As a heuristic helix will now only extend diagnostics that end on a word char
if new chars are appended to the word (so not for punctuation/ whitespace).
The idea for this mapping was inspired for the word level tracking vscode uses
for many positions. While VSCode doesn't currently update diagnostics after
receiving publishDiagnostic it does use this system for inlay hints for example.
Similarly, the new association mechanism implemented here can be used for word
level tracking of inlay hints.
A similar mapping function is implemented for word starts. Together
these can be used to make a diagnostic stick to a word. If that word
is removed that diagnostic is automatically removed too. This is the exact
same behavior VSCode inlay hints eixibit.