mirror of
https://github.com/NotAShelf/nvf.git
synced 2026-05-21 22:36:32 +00:00
Compare commits
8 commits
e60488a5e1
...
dd37fef311
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dd37fef311 | ||
|
|
9a915e7fdb | ||
|
|
fbaa62704d | ||
|
|
2ea6bb90e8 | ||
|
|
d9b7e86e23 | ||
|
|
5bd5a2a1d8 | ||
|
|
2db790ded0 | ||
|
|
9379e8a6ca |
48 changed files with 123832 additions and 57 deletions
File diff suppressed because one or more lines are too long
|
|
@ -606,7 +606,7 @@ Read more about it in the
|
||||||
<p>In the following example, we are creating a custom injection, to highlight the
|
<p>In the following example, we are creating a custom injection, to highlight the
|
||||||
Lua string after <code>mkLuaInline</code>.</p>
|
Lua string after <code>mkLuaInline</code>.</p>
|
||||||
<pre class="highlight"><code class="language-nix"><span style="color:rgb(97,175,239);">foo</span> <span style="color:rgb(171,178,191);">=</span> <span style="color:rgb(171,178,191);">mkLuaInline</span> <span style="color:rgb(152,195,121);">''</span><span style="color:rgb(152,195,121);"></span><br><span style="color:rgb(152,195,121);"> function bar()</span><br><span style="color:rgb(152,195,121);"> return 'foobar'</span><br><span style="color:rgb(152,195,121);"> end</span><br><span style="color:rgb(152,195,121);">''</span><span style="color:rgb(132,139,152);">;</span><br></code></pre>
|
<pre class="highlight"><code class="language-nix"><span style="color:rgb(97,175,239);">foo</span> <span style="color:rgb(171,178,191);">=</span> <span style="color:rgb(171,178,191);">mkLuaInline</span> <span style="color:rgb(152,195,121);">''</span><span style="color:rgb(152,195,121);"></span><br><span style="color:rgb(152,195,121);"> function bar()</span><br><span style="color:rgb(152,195,121);"> return 'foobar'</span><br><span style="color:rgb(152,195,121);"> end</span><br><span style="color:rgb(152,195,121);">''</span><span style="color:rgb(132,139,152);">;</span><br></code></pre>
|
||||||
<pre class="highlight"><code class="language-nix"><span style="color:rgb(132,139,152);">{</span><br> <span style="color:rgb(86,182,194);">vim</span><span style="color:rgb(132,139,152);">.</span><span style="color:rgb(86,182,194);">treesitter</span><span style="color:rgb(132,139,152);">.</span><span style="color:rgb(86,182,194);">queries</span> <span style="color:rgb(171,178,191);">=</span> <span style="color:rgb(132,139,152);">[</span><span style="color:rgb(132,139,152);">{</span><br> <span style="color:rgb(86,182,194);">type</span> <span style="color:rgb(171,178,191);">=</span> <span style="color:rgb(152,195,121);">"</span><span style="color:rgb(152,195,121);">injections</span><span style="color:rgb(152,195,121);">"</span><span style="color:rgb(132,139,152);">;</span><br> <span style="color:rgb(86,182,194);">filetypes</span> <span style="color:rgb(171,178,191);">=</span> <span style="color:rgb(132,139,152);">[</span><span style="color:rgb(152,195,121);">"</span><span style="color:rgb(152,195,121);">nix</span><span style="color:rgb(152,195,121);">"</span><span style="color:rgb(132,139,152);">]</span><span style="color:rgb(132,139,152);">;</span><br> <span style="color:rgb(86,182,194);">content</span> <span style="color:rgb(171,178,191);">=</span> <span style="color:rgb(152,195,121);">''</span><span style="color:rgb(152,195,121);"></span><br><span style="color:rgb(152,195,121);"> ;; extends</span><br><span style="color:rgb(152,195,121);"></span><br><span style="color:rgb(152,195,121);"> ((apply_expression</span><br><span style="color:rgb(152,195,121);"> function: (variable_expression</span><br><span style="color:rgb(152,195,121);"> name: (identifier) @_func</span><br><span style="color:rgb(152,195,121);"> (#eq? @_func "mkLuaInline"))</span><br><span style="color:rgb(152,195,121);"></span><br><span style="color:rgb(152,195,121);"> argument: (indented_string_expression</span><br><span style="color:rgb(152,195,121);"> (string_fragment) @injection.content)</span><br><span style="color:rgb(152,195,121);"></span><br><span style="color:rgb(152,195,121);"> (#set! injection.language "lua")</span><br><span style="color:rgb(152,195,121);"> (#set! injection.combined)))</span><br><span style="color:rgb(152,195,121);"> </span><span style="color:rgb(152,195,121);">''</span><span style="color:rgb(132,139,152);">;</span><br> <span style="color:rgb(132,139,152);">}</span><span style="color:rgb(132,139,152);">]</span><span style="color:rgb(132,139,152);">;</span><br><span style="color:rgb(132,139,152);">}</span><br></code></pre>
|
<pre class="highlight"><code class="language-nix"><span style="color:rgb(132,139,152);">{</span><br> <span style="color:rgb(86,182,194);">vim</span><span style="color:rgb(132,139,152);">.</span><span style="color:rgb(86,182,194);">treesitter</span><span style="color:rgb(132,139,152);">.</span><span style="color:rgb(86,182,194);">queries</span> <span style="color:rgb(171,178,191);">=</span> <span style="color:rgb(132,139,152);">[</span><span style="color:rgb(132,139,152);">{</span><br> <span style="color:rgb(86,182,194);">type</span> <span style="color:rgb(171,178,191);">=</span> <span style="color:rgb(152,195,121);">"</span><span style="color:rgb(152,195,121);">injections</span><span style="color:rgb(152,195,121);">"</span><span style="color:rgb(132,139,152);">;</span><br> <span style="color:rgb(86,182,194);">filetypes</span> <span style="color:rgb(171,178,191);">=</span> <span style="color:rgb(132,139,152);">[</span><span style="color:rgb(152,195,121);">"</span><span style="color:rgb(152,195,121);">nix</span><span style="color:rgb(152,195,121);">"</span><span style="color:rgb(132,139,152);">]</span><span style="color:rgb(132,139,152);">;</span><br> <span style="color:rgb(86,182,194);">query</span> <span style="color:rgb(171,178,191);">=</span> <span style="color:rgb(152,195,121);">''</span><span style="color:rgb(152,195,121);"></span><br><span style="color:rgb(152,195,121);"> ;; extends</span><br><span style="color:rgb(152,195,121);"></span><br><span style="color:rgb(152,195,121);"> ((apply_expression</span><br><span style="color:rgb(152,195,121);"> function: (variable_expression</span><br><span style="color:rgb(152,195,121);"> name: (identifier) @_func</span><br><span style="color:rgb(152,195,121);"> (#eq? @_func "mkLuaInline"))</span><br><span style="color:rgb(152,195,121);"></span><br><span style="color:rgb(152,195,121);"> argument: (indented_string_expression</span><br><span style="color:rgb(152,195,121);"> (string_fragment) @injection.content)</span><br><span style="color:rgb(152,195,121);"></span><br><span style="color:rgb(152,195,121);"> (#set! injection.language "lua")</span><br><span style="color:rgb(152,195,121);"> (#set! injection.combined)))</span><br><span style="color:rgb(152,195,121);"> </span><span style="color:rgb(152,195,121);">''</span><span style="color:rgb(132,139,152);">;</span><br> <span style="color:rgb(132,139,152);">}</span><span style="color:rgb(132,139,152);">]</span><span style="color:rgb(132,139,152);">;</span><br><span style="color:rgb(132,139,152);">}</span><br></code></pre>
|
||||||
<p>This will generate a <code>queries/nix/injections.scm</code> in a Neovim runtime directory.</p>
|
<p>This will generate a <code>queries/nix/injections.scm</code> in a Neovim runtime directory.</p>
|
||||||
<div class="admonition note">
|
<div class="admonition note">
|
||||||
<p class="admonition-title">Note</p>
|
<p class="admonition-title">Note</p>
|
||||||
|
|
|
||||||
1
docs-preview-1393/assets/search-data.json
Normal file
1
docs-preview-1393/assets/search-data.json
Normal file
File diff suppressed because one or more lines are too long
|
|
@ -606,7 +606,7 @@ Read more about it in the
|
||||||
<p>In the following example, we are creating a custom injection, to highlight the
|
<p>In the following example, we are creating a custom injection, to highlight the
|
||||||
Lua string after <code>mkLuaInline</code>.</p>
|
Lua string after <code>mkLuaInline</code>.</p>
|
||||||
<pre class="highlight"><code class="language-nix"><span style="color:rgb(97,175,239);">foo</span> <span style="color:rgb(171,178,191);">=</span> <span style="color:rgb(171,178,191);">mkLuaInline</span> <span style="color:rgb(152,195,121);">''</span><span style="color:rgb(152,195,121);"></span><br><span style="color:rgb(152,195,121);"> function bar()</span><br><span style="color:rgb(152,195,121);"> return 'foobar'</span><br><span style="color:rgb(152,195,121);"> end</span><br><span style="color:rgb(152,195,121);">''</span><span style="color:rgb(132,139,152);">;</span><br></code></pre>
|
<pre class="highlight"><code class="language-nix"><span style="color:rgb(97,175,239);">foo</span> <span style="color:rgb(171,178,191);">=</span> <span style="color:rgb(171,178,191);">mkLuaInline</span> <span style="color:rgb(152,195,121);">''</span><span style="color:rgb(152,195,121);"></span><br><span style="color:rgb(152,195,121);"> function bar()</span><br><span style="color:rgb(152,195,121);"> return 'foobar'</span><br><span style="color:rgb(152,195,121);"> end</span><br><span style="color:rgb(152,195,121);">''</span><span style="color:rgb(132,139,152);">;</span><br></code></pre>
|
||||||
<pre class="highlight"><code class="language-nix"><span style="color:rgb(132,139,152);">{</span><br> <span style="color:rgb(86,182,194);">vim</span><span style="color:rgb(132,139,152);">.</span><span style="color:rgb(86,182,194);">treesitter</span><span style="color:rgb(132,139,152);">.</span><span style="color:rgb(86,182,194);">queries</span> <span style="color:rgb(171,178,191);">=</span> <span style="color:rgb(132,139,152);">[</span><span style="color:rgb(132,139,152);">{</span><br> <span style="color:rgb(86,182,194);">type</span> <span style="color:rgb(171,178,191);">=</span> <span style="color:rgb(152,195,121);">"</span><span style="color:rgb(152,195,121);">injections</span><span style="color:rgb(152,195,121);">"</span><span style="color:rgb(132,139,152);">;</span><br> <span style="color:rgb(86,182,194);">filetypes</span> <span style="color:rgb(171,178,191);">=</span> <span style="color:rgb(132,139,152);">[</span><span style="color:rgb(152,195,121);">"</span><span style="color:rgb(152,195,121);">nix</span><span style="color:rgb(152,195,121);">"</span><span style="color:rgb(132,139,152);">]</span><span style="color:rgb(132,139,152);">;</span><br> <span style="color:rgb(86,182,194);">content</span> <span style="color:rgb(171,178,191);">=</span> <span style="color:rgb(152,195,121);">''</span><span style="color:rgb(152,195,121);"></span><br><span style="color:rgb(152,195,121);"> ;; extends</span><br><span style="color:rgb(152,195,121);"></span><br><span style="color:rgb(152,195,121);"> ((apply_expression</span><br><span style="color:rgb(152,195,121);"> function: (variable_expression</span><br><span style="color:rgb(152,195,121);"> name: (identifier) @_func</span><br><span style="color:rgb(152,195,121);"> (#eq? @_func "mkLuaInline"))</span><br><span style="color:rgb(152,195,121);"></span><br><span style="color:rgb(152,195,121);"> argument: (indented_string_expression</span><br><span style="color:rgb(152,195,121);"> (string_fragment) @injection.content)</span><br><span style="color:rgb(152,195,121);"></span><br><span style="color:rgb(152,195,121);"> (#set! injection.language "lua")</span><br><span style="color:rgb(152,195,121);"> (#set! injection.combined)))</span><br><span style="color:rgb(152,195,121);"> </span><span style="color:rgb(152,195,121);">''</span><span style="color:rgb(132,139,152);">;</span><br> <span style="color:rgb(132,139,152);">}</span><span style="color:rgb(132,139,152);">]</span><span style="color:rgb(132,139,152);">;</span><br><span style="color:rgb(132,139,152);">}</span><br></code></pre>
|
<pre class="highlight"><code class="language-nix"><span style="color:rgb(132,139,152);">{</span><br> <span style="color:rgb(86,182,194);">vim</span><span style="color:rgb(132,139,152);">.</span><span style="color:rgb(86,182,194);">treesitter</span><span style="color:rgb(132,139,152);">.</span><span style="color:rgb(86,182,194);">queries</span> <span style="color:rgb(171,178,191);">=</span> <span style="color:rgb(132,139,152);">[</span><span style="color:rgb(132,139,152);">{</span><br> <span style="color:rgb(86,182,194);">type</span> <span style="color:rgb(171,178,191);">=</span> <span style="color:rgb(152,195,121);">"</span><span style="color:rgb(152,195,121);">injections</span><span style="color:rgb(152,195,121);">"</span><span style="color:rgb(132,139,152);">;</span><br> <span style="color:rgb(86,182,194);">filetypes</span> <span style="color:rgb(171,178,191);">=</span> <span style="color:rgb(132,139,152);">[</span><span style="color:rgb(152,195,121);">"</span><span style="color:rgb(152,195,121);">nix</span><span style="color:rgb(152,195,121);">"</span><span style="color:rgb(132,139,152);">]</span><span style="color:rgb(132,139,152);">;</span><br> <span style="color:rgb(86,182,194);">query</span> <span style="color:rgb(171,178,191);">=</span> <span style="color:rgb(152,195,121);">''</span><span style="color:rgb(152,195,121);"></span><br><span style="color:rgb(152,195,121);"> ;; extends</span><br><span style="color:rgb(152,195,121);"></span><br><span style="color:rgb(152,195,121);"> ((apply_expression</span><br><span style="color:rgb(152,195,121);"> function: (variable_expression</span><br><span style="color:rgb(152,195,121);"> name: (identifier) @_func</span><br><span style="color:rgb(152,195,121);"> (#eq? @_func "mkLuaInline"))</span><br><span style="color:rgb(152,195,121);"></span><br><span style="color:rgb(152,195,121);"> argument: (indented_string_expression</span><br><span style="color:rgb(152,195,121);"> (string_fragment) @injection.content)</span><br><span style="color:rgb(152,195,121);"></span><br><span style="color:rgb(152,195,121);"> (#set! injection.language "lua")</span><br><span style="color:rgb(152,195,121);"> (#set! injection.combined)))</span><br><span style="color:rgb(152,195,121);"> </span><span style="color:rgb(152,195,121);">''</span><span style="color:rgb(132,139,152);">;</span><br> <span style="color:rgb(132,139,152);">}</span><span style="color:rgb(132,139,152);">]</span><span style="color:rgb(132,139,152);">;</span><br><span style="color:rgb(132,139,152);">}</span><br></code></pre>
|
||||||
<p>This will generate a <code>queries/nix/injections.scm</code> in a Neovim runtime directory.</p>
|
<p>This will generate a <code>queries/nix/injections.scm</code> in a Neovim runtime directory.</p>
|
||||||
<div class="admonition note">
|
<div class="admonition note">
|
||||||
<p class="admonition-title">Note</p>
|
<p class="admonition-title">Note</p>
|
||||||
|
|
@ -5335,7 +5335,7 @@
|
||||||
<details class="toc-category">
|
<details class="toc-category">
|
||||||
<summary title="vim.languages">
|
<summary title="vim.languages">
|
||||||
<span>vim.languages</span>
|
<span>vim.languages</span>
|
||||||
<span class="toc-count">514</span>
|
<span class="toc-count">515</span>
|
||||||
</summary>
|
</summary>
|
||||||
<ul>
|
<ul>
|
||||||
|
|
||||||
|
|
@ -6917,6 +6917,14 @@
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
<a href='#option-vim.languages.jinja.treesitter.injection' title="vim.languages.jinja.treesitter.injection">
|
||||||
|
jinja.treesitter.injection
|
||||||
|
|
||||||
|
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
<a href='#option-vim.languages.jinja.treesitter.inlinePackage' title="vim.languages.jinja.treesitter.inlinePackage">
|
<a href='#option-vim.languages.jinja.treesitter.inlinePackage' title="vim.languages.jinja.treesitter.inlinePackage">
|
||||||
jinja.treesitter.inlinePackage
|
jinja.treesitter.inlinePackage
|
||||||
|
|
@ -15385,7 +15393,7 @@
|
||||||
<details class="toc-category">
|
<details class="toc-category">
|
||||||
<summary title="vim.treesitter">
|
<summary title="vim.treesitter">
|
||||||
<span>vim.treesitter</span>
|
<span>vim.treesitter</span>
|
||||||
<span class="toc-count">25</span>
|
<span class="toc-count">26</span>
|
||||||
</summary>
|
</summary>
|
||||||
<ul>
|
<ul>
|
||||||
|
|
||||||
|
|
@ -15495,6 +15503,14 @@
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
<a href='#option-vim.treesitter.filetypeMappings' title="vim.treesitter.filetypeMappings">
|
||||||
|
filetypeMappings
|
||||||
|
|
||||||
|
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
<a href='#option-vim.treesitter.fold' title="vim.treesitter.fold">
|
<a href='#option-vim.treesitter.fold' title="vim.treesitter.fold">
|
||||||
fold
|
fold
|
||||||
|
|
@ -15552,16 +15568,16 @@
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
<a href='#option-vim.treesitter.queries._.content' title="vim.treesitter.queries.*.content">
|
<a href='#option-vim.treesitter.queries._.filetypes' title="vim.treesitter.queries.*.filetypes">
|
||||||
queries.*.content
|
queries.*.filetypes
|
||||||
|
|
||||||
|
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
<a href='#option-vim.treesitter.queries._.filetypes' title="vim.treesitter.queries.*.filetypes">
|
<a href='#option-vim.treesitter.queries._.query' title="vim.treesitter.queries.*.query">
|
||||||
queries.*.filetypes
|
queries.*.query
|
||||||
|
|
||||||
|
|
||||||
</a>
|
</a>
|
||||||
|
|
@ -30344,6 +30360,18 @@ not listed in the docs</p>
|
||||||
<div class="option-example">Example: <code>true</code></div>
|
<div class="option-example">Example: <code>true</code></div>
|
||||||
<div class="option-declared">Declared in: <code><a href="https://github.com/NotAShelf/nvf/blob/main/modules/plugins/languages/jinja.nix" target="_blank"><nvf/modules/plugins/languages/jinja.nix></a></code></div>
|
<div class="option-declared">Declared in: <code><a href="https://github.com/NotAShelf/nvf/blob/main/modules/plugins/languages/jinja.nix" target="_blank"><nvf/modules/plugins/languages/jinja.nix></a></code></div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="option" id="option-vim.languages.jinja.treesitter.injection">
|
||||||
|
<h3 class="option-name">
|
||||||
|
<a href="#option-vim.languages.jinja.treesitter.injection" class="option-anchor">vim.languages.jinja.treesitter.injection</a>
|
||||||
|
<span class="copy-link" title="Copy link to this option"></span>
|
||||||
|
<span class="copy-feedback">Link copied!</span>
|
||||||
|
</h3>
|
||||||
|
<div class="option-type">Type: <code>string</code></div>
|
||||||
|
<div class="option-description"><html><head></head><body><p>Treesitter language to inject in Jinja templates</p>
|
||||||
|
</body></html></div>
|
||||||
|
<div class="option-default">Default: <code>"html"</code></div>
|
||||||
|
<div class="option-declared">Declared in: <code><a href="https://github.com/NotAShelf/nvf/blob/main/modules/plugins/languages/jinja.nix" target="_blank"><nvf/modules/plugins/languages/jinja.nix></a></code></div>
|
||||||
|
</div>
|
||||||
<div class="option" id="option-vim.languages.jinja.treesitter.inlinePackage">
|
<div class="option" id="option-vim.languages.jinja.treesitter.inlinePackage">
|
||||||
<h3 class="option-name">
|
<h3 class="option-name">
|
||||||
<a href="#option-vim.languages.jinja.treesitter.inlinePackage" class="option-anchor">vim.languages.jinja.treesitter.inlinePackage</a>
|
<a href="#option-vim.languages.jinja.treesitter.inlinePackage" class="option-anchor">vim.languages.jinja.treesitter.inlinePackage</a>
|
||||||
|
|
@ -44491,6 +44519,26 @@ there are at least 2 lines above cursorline.</p>
|
||||||
<div class="option-example">Example: <code>true</code></div>
|
<div class="option-example">Example: <code>true</code></div>
|
||||||
<div class="option-declared">Declared in: <code><a href="https://github.com/NotAShelf/nvf/blob/main/modules/plugins/treesitter/treesitter.nix" target="_blank"><nvf/modules/plugins/treesitter/treesitter.nix></a></code></div>
|
<div class="option-declared">Declared in: <code><a href="https://github.com/NotAShelf/nvf/blob/main/modules/plugins/treesitter/treesitter.nix" target="_blank"><nvf/modules/plugins/treesitter/treesitter.nix></a></code></div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="option" id="option-vim.treesitter.filetypeMappings">
|
||||||
|
<h3 class="option-name">
|
||||||
|
<a href="#option-vim.treesitter.filetypeMappings" class="option-anchor">vim.treesitter.filetypeMappings</a>
|
||||||
|
<span class="copy-link" title="Copy link to this option"></span>
|
||||||
|
<span class="copy-feedback">Link copied!</span>
|
||||||
|
</h3>
|
||||||
|
<div class="option-type">Type: <code>attribute set of list of string</code></div>
|
||||||
|
<div class="option-description"><html><head></head><body><p>For each parser, registers a list of alternative filetypes.
|
||||||
|
For more information see <code>:h vim.treesitter.language.register()</code>.
|
||||||
|
See treesitter builtin mappings here: <<a href="https://github.com/nvim-treesitter/nvim-treesitter/blob/main/plugin/filetypes.lua">https://github.com/nvim-treesitter/nvim-treesitter/blob/main/plugin/filetypes.lua</a>></p>
|
||||||
|
</body></html></div>
|
||||||
|
<div class="option-default">Default: <code>{ }</code></div>
|
||||||
|
<div class="option-example">Example: <pre><code>{
|
||||||
|
sh = [
|
||||||
|
"ash"
|
||||||
|
"dash"
|
||||||
|
];
|
||||||
|
}</code></pre></div>
|
||||||
|
<div class="option-declared">Declared in: <code><a href="https://github.com/NotAShelf/nvf/blob/main/modules/plugins/treesitter/treesitter.nix" target="_blank"><nvf/modules/plugins/treesitter/treesitter.nix></a></code></div>
|
||||||
|
</div>
|
||||||
<div class="option" id="option-vim.treesitter.fold">
|
<div class="option" id="option-vim.treesitter.fold">
|
||||||
<h3 class="option-name">
|
<h3 class="option-name">
|
||||||
<a href="#option-vim.treesitter.fold" class="option-anchor">vim.treesitter.fold</a>
|
<a href="#option-vim.treesitter.fold" class="option-anchor">vim.treesitter.fold</a>
|
||||||
|
|
@ -44591,17 +44639,6 @@ the required grammars to this.</p>
|
||||||
<div class="option-default">Default: <code>[ ]</code></div>
|
<div class="option-default">Default: <code>[ ]</code></div>
|
||||||
<div class="option-declared">Declared in: <code><a href="https://github.com/NotAShelf/nvf/blob/main/modules/plugins/treesitter/treesitter.nix" target="_blank"><nvf/modules/plugins/treesitter/treesitter.nix></a></code></div>
|
<div class="option-declared">Declared in: <code><a href="https://github.com/NotAShelf/nvf/blob/main/modules/plugins/treesitter/treesitter.nix" target="_blank"><nvf/modules/plugins/treesitter/treesitter.nix></a></code></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="option" id="option-vim.treesitter.queries._.content">
|
|
||||||
<h3 class="option-name">
|
|
||||||
<a href="#option-vim.treesitter.queries._.content" class="option-anchor">vim.treesitter.queries.*.content</a>
|
|
||||||
<span class="copy-link" title="Copy link to this option"></span>
|
|
||||||
<span class="copy-feedback">Link copied!</span>
|
|
||||||
</h3>
|
|
||||||
<div class="option-type">Type: <code>strings concatenated with "\n"</code></div>
|
|
||||||
<div class="option-description"><html><head></head><body><p>The queries scm script.</p>
|
|
||||||
</body></html></div>
|
|
||||||
<div class="option-declared">Declared in: <code><a href="https://github.com/NotAShelf/nvf/blob/main/modules/plugins/treesitter/treesitter.nix" target="_blank"><nvf/modules/plugins/treesitter/treesitter.nix></a></code></div>
|
|
||||||
</div>
|
|
||||||
<div class="option" id="option-vim.treesitter.queries._.filetypes">
|
<div class="option" id="option-vim.treesitter.queries._.filetypes">
|
||||||
<h3 class="option-name">
|
<h3 class="option-name">
|
||||||
<a href="#option-vim.treesitter.queries._.filetypes" class="option-anchor">vim.treesitter.queries.*.filetypes</a>
|
<a href="#option-vim.treesitter.queries._.filetypes" class="option-anchor">vim.treesitter.queries.*.filetypes</a>
|
||||||
|
|
@ -44614,6 +44651,17 @@ the required grammars to this.</p>
|
||||||
<div class="option-default">Default: <code>[ ]</code></div>
|
<div class="option-default">Default: <code>[ ]</code></div>
|
||||||
<div class="option-declared">Declared in: <code><a href="https://github.com/NotAShelf/nvf/blob/main/modules/plugins/treesitter/treesitter.nix" target="_blank"><nvf/modules/plugins/treesitter/treesitter.nix></a></code></div>
|
<div class="option-declared">Declared in: <code><a href="https://github.com/NotAShelf/nvf/blob/main/modules/plugins/treesitter/treesitter.nix" target="_blank"><nvf/modules/plugins/treesitter/treesitter.nix></a></code></div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="option" id="option-vim.treesitter.queries._.query">
|
||||||
|
<h3 class="option-name">
|
||||||
|
<a href="#option-vim.treesitter.queries._.query" class="option-anchor">vim.treesitter.queries.*.query</a>
|
||||||
|
<span class="copy-link" title="Copy link to this option"></span>
|
||||||
|
<span class="copy-feedback">Link copied!</span>
|
||||||
|
</h3>
|
||||||
|
<div class="option-type">Type: <code>strings concatenated with "\n"</code></div>
|
||||||
|
<div class="option-description"><html><head></head><body><p>The queries scm script.</p>
|
||||||
|
</body></html></div>
|
||||||
|
<div class="option-declared">Declared in: <code><a href="https://github.com/NotAShelf/nvf/blob/main/modules/plugins/treesitter/treesitter.nix" target="_blank"><nvf/modules/plugins/treesitter/treesitter.nix></a></code></div>
|
||||||
|
</div>
|
||||||
<div class="option" id="option-vim.treesitter.queries._.type">
|
<div class="option" id="option-vim.treesitter.queries._.type">
|
||||||
<h3 class="option-name">
|
<h3 class="option-name">
|
||||||
<a href="#option-vim.treesitter.queries._.type" class="option-anchor">vim.treesitter.queries.*.type</a>
|
<a href="#option-vim.treesitter.queries._.type" class="option-anchor">vim.treesitter.queries.*.type</a>
|
||||||
|
|
@ -468,14 +468,31 @@ formatter.</p>
|
||||||
<p>Added <a class="option-reference" href="options.html#option-vim.treesitter.queries"><code class="nixos-option">vim.treesitter.queries</code></a> to support adding custom queries.</p>
|
<p>Added <a class="option-reference" href="options.html#option-vim.treesitter.queries"><code class="nixos-option">vim.treesitter.queries</code></a> to support adding custom queries.</p>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<p>Added injections for <code>vim.treesitter.queries.*.content</code> as <code>query</code> and
|
<p>Added injections for <code>query = '' ... ''</code> as <code>query</code> and <code>mkLualine '' ... ''</code>,
|
||||||
<code>mkLualine</code>, <code>entryAnywhere</code>, <code>entryBefore</code>, <code>entryAfter</code> as <code>lua</code> in nix.</p>
|
<code>entryAnywhere '' ... ''</code>, <code>entryBefore ] '' ... ''</code>,
|
||||||
|
<code>entryAfter ] '' ... ''</code> as <code>lua</code> in nix.</p>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<p>Added <a class="option-reference" href="options.html#option-vim.languages.tera.treesitter.injection"><code class="nixos-option">vim.languages.tera.treesitter.injection</code></a> to configure, what
|
<p>Added <a class="option-reference" href="options.html#option-vim.languages.tera.treesitter.injection"><code class="nixos-option">vim.languages.tera.treesitter.injection</code></a> to configure, what
|
||||||
language the content is.</p>
|
language the content is.</p>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
|
<p>Added <a class="option-reference" href="options.html#option-vim.languages.jinja.treesitter.injection"><code class="nixos-option">vim.languages.jinja.treesitter.injection</code></a> to configure, what
|
||||||
|
language the content is.</p>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<p>Added <a class="option-reference" href="options.html#option-vim.treesitter.filetypeMappings"><code class="nixos-option">vim.treesitter.filetypeMappings</code></a> to support mappings similar to
|
||||||
|
<a href="https://github.com/nvim-treesitter/nvim-treesitter/blob/main/plugin/filetypes.lua">https://github.com/nvim-treesitter/nvim-treesitter/blob/main/plugin/filetypes.lua</a>.
|
||||||
|
This is mostly use full for Markdown code block injections.</p>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<p>Added some Tree-sitter filetype mappings for:</p>
|
||||||
|
<ul>
|
||||||
|
<li><code>bash</code> = <code>ash</code>, <code>dash</code>, <code>zsh</code></li>
|
||||||
|
<li><code>yaml</code> = <code>yaml</code></li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
<p>Added <code>vim.lsp.presets.<name></code> to contain LSP configurations. This allows for
|
<p>Added <code>vim.lsp.presets.<name></code> to contain LSP configurations. This allows for
|
||||||
more flexibility in nvf and reuse of LSPs across languages. Dropped
|
more flexibility in nvf and reuse of LSPs across languages. Dropped
|
||||||
<code>deprecatedSingleOrListOf</code> in favor of <code>listOf</code> for the affected LSP options.</p>
|
<code>deprecatedSingleOrListOf</code> in favor of <code>listOf</code> for the affected LSP options.</p>
|
||||||
1062
docs-preview-1431/assets/main.js
Normal file
1062
docs-preview-1431/assets/main.js
Normal file
File diff suppressed because it is too large
Load diff
1
docs-preview-1431/assets/search-data.json
Normal file
1
docs-preview-1431/assets/search-data.json
Normal file
File diff suppressed because one or more lines are too long
298
docs-preview-1431/assets/search-worker.js
Normal file
298
docs-preview-1431/assets/search-worker.js
Normal file
|
|
@ -0,0 +1,298 @@
|
||||||
|
const isWordBoundary = (char) =>
|
||||||
|
/[A-Z]/.test(char) || /[-_\/.]/.test(char) || /\s/.test(char);
|
||||||
|
|
||||||
|
const isCaseTransition = (prev, curr) => {
|
||||||
|
const prevIsUpper = prev.toLowerCase() !== prev;
|
||||||
|
const currIsUpper = curr.toLowerCase() !== curr;
|
||||||
|
return (
|
||||||
|
prevIsUpper && currIsUpper && prev.toLowerCase() !== curr.toLowerCase()
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
const findBestSubsequenceMatch = (query, target) => {
|
||||||
|
const n = query.length;
|
||||||
|
const m = target.length;
|
||||||
|
|
||||||
|
if (n === 0 || m === 0) return null;
|
||||||
|
|
||||||
|
const positions = [];
|
||||||
|
|
||||||
|
const memo = new Map();
|
||||||
|
const key = (qIdx, tIdx, gap) => `${qIdx}:${tIdx}:${gap}`;
|
||||||
|
|
||||||
|
const findBest = (qIdx, tIdx, currentGap) => {
|
||||||
|
if (qIdx === n) {
|
||||||
|
return { done: true, positions: [...positions], gap: currentGap };
|
||||||
|
}
|
||||||
|
|
||||||
|
const memoKey = key(qIdx, tIdx, currentGap);
|
||||||
|
if (memo.has(memoKey)) {
|
||||||
|
return memo.get(memoKey);
|
||||||
|
}
|
||||||
|
|
||||||
|
let bestResult = null;
|
||||||
|
|
||||||
|
for (let i = tIdx; i < m; i++) {
|
||||||
|
if (target[i] === query[qIdx]) {
|
||||||
|
positions.push(i);
|
||||||
|
const gap = qIdx === 0 ? 0 : i - positions[positions.length - 2] - 1;
|
||||||
|
const newGap = currentGap + gap;
|
||||||
|
|
||||||
|
if (newGap > m) {
|
||||||
|
positions.pop();
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
const result = findBest(qIdx + 1, i + 1, newGap);
|
||||||
|
positions.pop();
|
||||||
|
|
||||||
|
if (result && (!bestResult || result.gap < bestResult.gap)) {
|
||||||
|
bestResult = result;
|
||||||
|
if (result.gap === 0) break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
memo.set(memoKey, bestResult);
|
||||||
|
return bestResult;
|
||||||
|
};
|
||||||
|
|
||||||
|
const result = findBest(0, 0, 0);
|
||||||
|
if (!result) return null;
|
||||||
|
|
||||||
|
const consecutive = (() => {
|
||||||
|
let c = 1;
|
||||||
|
for (let i = 1; i < result.positions.length; i++) {
|
||||||
|
if (result.positions[i] === result.positions[i - 1] + 1) {
|
||||||
|
c++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return c;
|
||||||
|
})();
|
||||||
|
|
||||||
|
return {
|
||||||
|
positions: result.positions,
|
||||||
|
consecutive,
|
||||||
|
score: calculateMatchScore(query, target, result.positions, consecutive),
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
const calculateMatchScore = (query, target, positions, consecutive) => {
|
||||||
|
const n = positions.length;
|
||||||
|
const m = target.length;
|
||||||
|
|
||||||
|
if (n === 0) return 0;
|
||||||
|
|
||||||
|
let score = 1.0;
|
||||||
|
|
||||||
|
const startBonus = (m - positions[0]) / m;
|
||||||
|
score += startBonus * 0.5;
|
||||||
|
|
||||||
|
let gapPenalty = 0;
|
||||||
|
for (let i = 1; i < n; i++) {
|
||||||
|
const gap = positions[i] - positions[i - 1] - 1;
|
||||||
|
if (gap > 0) {
|
||||||
|
gapPenalty += Math.min(gap / m, 1.0) * 0.3;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
score -= gapPenalty;
|
||||||
|
|
||||||
|
const consecutiveBonus = consecutive / n;
|
||||||
|
score += consecutiveBonus * 0.3;
|
||||||
|
|
||||||
|
let boundaryBonus = 0;
|
||||||
|
for (let i = 0; i < n; i++) {
|
||||||
|
const char = target[positions[i]];
|
||||||
|
if (i === 0 || isWordBoundary(char)) {
|
||||||
|
boundaryBonus += 0.05;
|
||||||
|
}
|
||||||
|
if (i > 0) {
|
||||||
|
const prevChar = target[positions[i - 1]];
|
||||||
|
if (isCaseTransition(prevChar, char)) {
|
||||||
|
boundaryBonus += 0.03;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
score = Math.min(1.0, score + boundaryBonus);
|
||||||
|
|
||||||
|
const lengthPenalty = Math.abs(query.length - n) / Math.max(query.length, m);
|
||||||
|
score -= lengthPenalty * 0.2;
|
||||||
|
|
||||||
|
return Math.max(0, Math.min(1.0, score));
|
||||||
|
};
|
||||||
|
|
||||||
|
const fuzzyMatch = (query, target) => {
|
||||||
|
const lowerQuery = query.toLowerCase();
|
||||||
|
const lowerTarget = target.toLowerCase();
|
||||||
|
|
||||||
|
if (lowerQuery.length === 0) return null;
|
||||||
|
if (lowerTarget.length === 0) return null;
|
||||||
|
|
||||||
|
if (lowerTarget === lowerQuery) {
|
||||||
|
return 1.0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (lowerTarget.includes(lowerQuery)) {
|
||||||
|
const ratio = lowerQuery.length / lowerTarget.length;
|
||||||
|
return 0.8 + ratio * 0.2;
|
||||||
|
}
|
||||||
|
|
||||||
|
const match = findBestSubsequenceMatch(lowerQuery, lowerTarget);
|
||||||
|
if (!match) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return Math.min(1.0, match.score);
|
||||||
|
};
|
||||||
|
|
||||||
|
self.onmessage = function (e) {
|
||||||
|
const { messageId, type, data } = e.data;
|
||||||
|
|
||||||
|
const respond = (type, data) => {
|
||||||
|
self.postMessage({ messageId, type, data });
|
||||||
|
};
|
||||||
|
|
||||||
|
const respondError = (error) => {
|
||||||
|
self.postMessage({
|
||||||
|
messageId,
|
||||||
|
type: "error",
|
||||||
|
error: error.message || String(error),
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
try {
|
||||||
|
if (type === "tokenize") {
|
||||||
|
const text = typeof data === "string" ? data : "";
|
||||||
|
const words = text.toLowerCase().match(/\b[a-zA-Z0-9_-]+\b/g) || [];
|
||||||
|
const tokens = words.filter((word) => word.length > 2);
|
||||||
|
const uniqueTokens = Array.from(new Set(tokens));
|
||||||
|
respond("tokens", uniqueTokens);
|
||||||
|
} else if (type === "search") {
|
||||||
|
const { query, limit = 10 } = data;
|
||||||
|
|
||||||
|
if (!query || typeof query !== "string") {
|
||||||
|
respond("results", []);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const rawQuery = query.toLowerCase();
|
||||||
|
const text = typeof query === "string" ? query : "";
|
||||||
|
const words = text.toLowerCase().match(/\b[a-zA-Z0-9_-]+\b/g) || [];
|
||||||
|
const searchTerms = words.filter((word) => word.length > 2);
|
||||||
|
|
||||||
|
let documents = [];
|
||||||
|
if (typeof data.documents === "string") {
|
||||||
|
documents = JSON.parse(data.documents);
|
||||||
|
} else if (Array.isArray(data.documents)) {
|
||||||
|
documents = data.documents;
|
||||||
|
} else if (typeof data.transferables === "string") {
|
||||||
|
documents = JSON.parse(data.transferables);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!Array.isArray(documents) || documents.length === 0) {
|
||||||
|
respond("results", []);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const useFuzzySearch = rawQuery.length >= 3;
|
||||||
|
|
||||||
|
if (searchTerms.length === 0 && rawQuery.length < 3) {
|
||||||
|
respond("results", []);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const pageMatches = new Map();
|
||||||
|
|
||||||
|
// Pre-compute lower-case strings for each document
|
||||||
|
const processedDocs = documents.map((doc, docId) => {
|
||||||
|
const title = typeof doc.title === "string" ? doc.title : "";
|
||||||
|
const content = typeof doc.content === "string" ? doc.content : "";
|
||||||
|
|
||||||
|
return {
|
||||||
|
docId,
|
||||||
|
doc,
|
||||||
|
lowerTitle: title.toLowerCase(),
|
||||||
|
lowerContent: content.toLowerCase(),
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
|
// First pass: Score pages with fuzzy matching
|
||||||
|
processedDocs.forEach(({ docId, doc, lowerTitle, lowerContent }) => {
|
||||||
|
let match = pageMatches.get(docId);
|
||||||
|
if (!match) {
|
||||||
|
match = { doc, pageScore: 0, matchingAnchors: [] };
|
||||||
|
pageMatches.set(docId, match);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (useFuzzySearch) {
|
||||||
|
const fuzzyTitleScore = fuzzyMatch(rawQuery, lowerTitle);
|
||||||
|
if (fuzzyTitleScore !== null) {
|
||||||
|
match.pageScore += fuzzyTitleScore * 100;
|
||||||
|
}
|
||||||
|
|
||||||
|
const fuzzyContentScore = fuzzyMatch(rawQuery, lowerContent);
|
||||||
|
if (fuzzyContentScore !== null) {
|
||||||
|
match.pageScore += fuzzyContentScore * 30;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Token-based exact matching
|
||||||
|
searchTerms.forEach((term) => {
|
||||||
|
if (lowerTitle.includes(term)) {
|
||||||
|
match.pageScore += lowerTitle === term ? 20 : 10;
|
||||||
|
}
|
||||||
|
if (lowerContent.includes(term)) {
|
||||||
|
match.pageScore += 2;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
// Second pass: Find matching anchors
|
||||||
|
pageMatches.forEach((match) => {
|
||||||
|
const doc = match.doc;
|
||||||
|
if (
|
||||||
|
!doc.anchors ||
|
||||||
|
!Array.isArray(doc.anchors) ||
|
||||||
|
doc.anchors.length === 0
|
||||||
|
) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
doc.anchors.forEach((anchor) => {
|
||||||
|
if (!anchor || !anchor.text) return;
|
||||||
|
|
||||||
|
const anchorText = anchor.text.toLowerCase();
|
||||||
|
let anchorMatches = false;
|
||||||
|
|
||||||
|
if (useFuzzySearch) {
|
||||||
|
const fuzzyScore = fuzzyMatch(rawQuery, anchorText);
|
||||||
|
if (fuzzyScore !== null && fuzzyScore >= 0.4) {
|
||||||
|
anchorMatches = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!anchorMatches) {
|
||||||
|
searchTerms.forEach((term) => {
|
||||||
|
if (anchorText.includes(term)) {
|
||||||
|
anchorMatches = true;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if (anchorMatches) {
|
||||||
|
match.matchingAnchors.push(anchor);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
const results = Array.from(pageMatches.values())
|
||||||
|
.filter((m) => m.pageScore > 5)
|
||||||
|
.sort((a, b) => b.pageScore - a.pageScore)
|
||||||
|
.slice(0, limit);
|
||||||
|
|
||||||
|
respond("results", results);
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
respondError(error);
|
||||||
|
}
|
||||||
|
};
|
||||||
1747
docs-preview-1431/assets/search.js
Normal file
1747
docs-preview-1431/assets/search.js
Normal file
File diff suppressed because it is too large
Load diff
2539
docs-preview-1431/assets/style.css
Normal file
2539
docs-preview-1431/assets/style.css
Normal file
File diff suppressed because it is too large
Load diff
667
docs-preview-1431/configuring.html
Normal file
667
docs-preview-1431/configuring.html
Normal file
File diff suppressed because one or more lines are too long
540
docs-preview-1431/hacking.html
Normal file
540
docs-preview-1431/hacking.html
Normal file
File diff suppressed because one or more lines are too long
400
docs-preview-1431/index.html
Normal file
400
docs-preview-1431/index.html
Normal file
File diff suppressed because one or more lines are too long
51515
docs-preview-1431/options.html
Normal file
51515
docs-preview-1431/options.html
Normal file
File diff suppressed because it is too large
Load diff
157
docs-preview-1431/quirks.html
Normal file
157
docs-preview-1431/quirks.html
Normal file
|
|
@ -0,0 +1,157 @@
|
||||||
|
<!doctype html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
|
<title>Known Issues and Quirks</title>
|
||||||
|
|
||||||
|
|
||||||
|
<script>
|
||||||
|
// Apply sidebar state immediately to prevent flash
|
||||||
|
(function () {
|
||||||
|
try {
|
||||||
|
if (localStorage.getItem("sidebar-collapsed") === "true") {
|
||||||
|
document.documentElement.classList.add("sidebar-collapsed");
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
// localStorage unavailable
|
||||||
|
}
|
||||||
|
})();
|
||||||
|
</script>
|
||||||
|
<link rel="stylesheet" href="assets/style.css" />
|
||||||
|
<script defer src="assets/main.js"></script>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
window.searchNamespace = window.searchNamespace || {};
|
||||||
|
window.searchNamespace.rootPath = "";
|
||||||
|
</script>
|
||||||
|
<script defer src="assets/search.js"></script>
|
||||||
|
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="container">
|
||||||
|
<header>
|
||||||
|
<div class="header-left">
|
||||||
|
<h1 class="site-title">
|
||||||
|
<a href="index.html">NVF</a>
|
||||||
|
</h1>
|
||||||
|
|
||||||
|
<nav class="header-nav">
|
||||||
|
<ul>
|
||||||
|
<li >
|
||||||
|
<a href="options.html">Options</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li><a href="search.html">Search</a></li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="search-container">
|
||||||
|
<input type="text" id="search-input" placeholder="Search..." />
|
||||||
|
<div id="search-results" class="search-results"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<div class="layout">
|
||||||
|
<div class="sidebar-toggle" aria-label="Toggle sidebar">
|
||||||
|
<svg
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
viewBox="0 0 24 24"
|
||||||
|
width="24"
|
||||||
|
height="24"
|
||||||
|
>
|
||||||
|
<path d="M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"></path>
|
||||||
|
</svg>
|
||||||
|
</div>
|
||||||
|
<nav class="sidebar">
|
||||||
|
<details class="sidebar-section" data-section="docs" open>
|
||||||
|
<summary>Documents</summary>
|
||||||
|
<div class="sidebar-section-content">
|
||||||
|
<ul>
|
||||||
|
<li><a href="index.html">Introduction</a></li>
|
||||||
|
<li><a href="configuring.html">Configuring nvf</a></li>
|
||||||
|
<li><a href="hacking.html">Hacking nvf</a></li>
|
||||||
|
<li><a href="tips.html">Helpful Tips</a></li>
|
||||||
|
<li><a href="quirks.html">Known Issues and Quirks</a></li>
|
||||||
|
<li><a href="release-notes.html">Release Notes</a></li>
|
||||||
|
<li><a href="search.html">Search</a></li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</details>
|
||||||
|
|
||||||
|
<details class="sidebar-section" data-section="toc" open>
|
||||||
|
<summary>Contents</summary>
|
||||||
|
<div class="sidebar-section-content">
|
||||||
|
<ul class="toc-list">
|
||||||
|
<li><a href="#ch-known-issues-quirks">Known Issues and Quirks</a>
|
||||||
|
<ul><li><a href="#ch-quirks-nodejs">NodeJS</a>
|
||||||
|
<ul><li><a href="#sec-eslint-plugin-prettier">eslint-plugin-prettier</a>
|
||||||
|
</ul><li><a href="#ch-bugs-suggestions">Bugs & Suggestions</a>
|
||||||
|
</li></ul></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</details>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<main class="content"><html><head></head><body><h1 id="ch-known-issues-quirks">Known Issues and Quirks</h1>
|
||||||
|
<p>At times, certain plugins and modules may refuse to play nicely with your setup,
|
||||||
|
be it a result of generating Lua from Nix, or the state of packaging. This page,
|
||||||
|
in turn, will list any known modules or plugins that are known to misbehave, and
|
||||||
|
possible workarounds that you may apply.</p>
|
||||||
|
<h2 id="ch-quirks-nodejs">NodeJS</h2>
|
||||||
|
<h3 id="sec-eslint-plugin-prettier">eslint-plugin-prettier</h3>
|
||||||
|
<p>When working with NodeJS, which is <em>obviously</em> known for its meticulous
|
||||||
|
standards, most things are bound to work as expected but some projects, tools
|
||||||
|
and settings may fool the default configurations of tools provided by <strong>nvf</strong>.</p>
|
||||||
|
<p>If <a href="https://github.com/prettier/eslint-plugin-prettier">eslint-plugin-prettier</a> or similar is included, you might get a situation
|
||||||
|
where your Eslint configuration diagnoses your formatting according to its own
|
||||||
|
config (usually <code>.eslintrc.js</code>). The issue there is your formatting is made via
|
||||||
|
prettierd.</p>
|
||||||
|
<p>This results in auto-formatting relying on your prettier configuration, while
|
||||||
|
your Eslint configuration diagnoses formatting "issues" while it's
|
||||||
|
<a href="https://prettier.io/docs/en/comparison.html">not supposed to</a>. In the end, you get discrepancies between what your editor
|
||||||
|
does and what it wants.</p>
|
||||||
|
<p>Solutions are:</p>
|
||||||
|
<ol>
|
||||||
|
<li>Don't add a formatting config to Eslint, instead separate Prettier and
|
||||||
|
Eslint.</li>
|
||||||
|
<li>PR the repo in question to add an ESLint formatter, and configure <strong>nvf</strong> to
|
||||||
|
use it.</li>
|
||||||
|
</ol>
|
||||||
|
<h2 id="ch-bugs-suggestions">Bugs & Suggestions</h2>
|
||||||
|
<p>Some quirks are not exactly quirks, but bugs in the module system. If you notice
|
||||||
|
any issues with <strong>nvf</strong>, or this documentation, then please consider reporting
|
||||||
|
them over at the <a href="https://github.com/notashelf/nvf/issues">issue tracker</a>. Issues tab, in addition to the
|
||||||
|
<a href="https://github.com/notashelf/nvf/discussions">discussions tab</a> is a good place as any to request new features.</p>
|
||||||
|
<p>You may also consider submitting bug fixes, feature additions and upstreamed
|
||||||
|
changes that you think are critical over at the <a href="https://github.com/notashelf/nvf/pulls">pull requests tab</a>.</p>
|
||||||
|
</body></html></main>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<aside class="page-toc">
|
||||||
|
<nav class="page-toc-nav">
|
||||||
|
<h3>On this page</h3>
|
||||||
|
<ul class="page-toc-list">
|
||||||
|
<li><a href="#ch-known-issues-quirks">Known Issues and Quirks</a>
|
||||||
|
<ul><li><a href="#ch-quirks-nodejs">NodeJS</a>
|
||||||
|
<ul><li><a href="#sec-eslint-plugin-prettier">eslint-plugin-prettier</a>
|
||||||
|
</ul><li><a href="#ch-bugs-suggestions">Bugs & Suggestions</a>
|
||||||
|
</li></ul></li>
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
</aside>
|
||||||
|
|
||||||
|
<footer>
|
||||||
|
<p>Generated with ndg</p>
|
||||||
|
</footer>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
2482
docs-preview-1431/release-notes.html
Normal file
2482
docs-preview-1431/release-notes.html
Normal file
File diff suppressed because one or more lines are too long
140
docs-preview-1431/search.html
Normal file
140
docs-preview-1431/search.html
Normal file
|
|
@ -0,0 +1,140 @@
|
||||||
|
<!doctype html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
|
<title>NVF - Search</title>
|
||||||
|
|
||||||
|
|
||||||
|
<script>
|
||||||
|
// Apply sidebar state immediately to prevent flash
|
||||||
|
(function () {
|
||||||
|
try {
|
||||||
|
if (localStorage.getItem("sidebar-collapsed") === "true") {
|
||||||
|
document.documentElement.classList.add("sidebar-collapsed");
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
// localStorage unavailable
|
||||||
|
}
|
||||||
|
})();
|
||||||
|
</script>
|
||||||
|
<link rel="stylesheet" href="assets/style.css" />
|
||||||
|
<script defer src="assets/main.js"></script>
|
||||||
|
<script>
|
||||||
|
window.searchNamespace = window.searchNamespace || {};
|
||||||
|
window.searchNamespace.rootPath = "";
|
||||||
|
</script>
|
||||||
|
<script defer src="assets/search.js"></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="container">
|
||||||
|
<header>
|
||||||
|
<div class="header-left">
|
||||||
|
<h1 class="site-title">
|
||||||
|
<a href="index.html">NVF</a>
|
||||||
|
</h1>
|
||||||
|
</div>
|
||||||
|
<nav class="header-nav">
|
||||||
|
<ul>
|
||||||
|
<li >
|
||||||
|
<a href="options.html">Options</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li><a href="search.html">Search</a></li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<div class="search-container">
|
||||||
|
<input
|
||||||
|
type="search"
|
||||||
|
id="search-input"
|
||||||
|
placeholder="Search..."
|
||||||
|
aria-label="Search"
|
||||||
|
autocomplete="off"
|
||||||
|
/>
|
||||||
|
<div
|
||||||
|
id="search-results"
|
||||||
|
class="search-results"
|
||||||
|
role="region"
|
||||||
|
aria-live="polite"
|
||||||
|
aria-label="Search results"
|
||||||
|
></div>
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<div class="layout">
|
||||||
|
<div class="sidebar-toggle" aria-label="Toggle sidebar">
|
||||||
|
<svg
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
viewBox="0 0 24 24"
|
||||||
|
width="24"
|
||||||
|
height="24"
|
||||||
|
>
|
||||||
|
<path d="M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"></path>
|
||||||
|
</svg>
|
||||||
|
</div>
|
||||||
|
<nav id="sidebar" class="sidebar">
|
||||||
|
<div class="docs-nav">
|
||||||
|
<h2>Documents</h2>
|
||||||
|
<ul>
|
||||||
|
<li><a href="index.html">Introduction</a></li>
|
||||||
|
<li><a href="configuring.html">Configuring nvf</a></li>
|
||||||
|
<li><a href="hacking.html">Hacking nvf</a></li>
|
||||||
|
<li><a href="tips.html">Helpful Tips</a></li>
|
||||||
|
<li><a href="quirks.html">Known Issues and Quirks</a></li>
|
||||||
|
<li><a href="release-notes.html">Release Notes</a></li>
|
||||||
|
<li><a href="search.html">Search</a></li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="toc">
|
||||||
|
<h2>Contents</h2>
|
||||||
|
<ul class="toc-list">
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<main class="content">
|
||||||
|
<h1>Search</h1>
|
||||||
|
<div class="search-page">
|
||||||
|
<div class="search-form">
|
||||||
|
<input
|
||||||
|
type="search"
|
||||||
|
id="search-page-input"
|
||||||
|
placeholder="Search..."
|
||||||
|
aria-label="Search"
|
||||||
|
autocomplete="off"
|
||||||
|
autofocus
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div class="search-keyboard-hints" role="note" aria-label="Keyboard shortcuts">
|
||||||
|
<span class="hint-item"><kbd>↑</kbd> <kbd>↓</kbd> to navigate</span>
|
||||||
|
<span class="hint-item"><kbd>Enter</kbd> to select</span>
|
||||||
|
<span class="hint-item"><kbd>Esc</kbd> to clear</span>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
id="search-page-results"
|
||||||
|
class="search-page-results"
|
||||||
|
role="region"
|
||||||
|
aria-live="polite"
|
||||||
|
aria-label="Search results"
|
||||||
|
></div>
|
||||||
|
</div>
|
||||||
|
<div class="footnotes-container">
|
||||||
|
<!-- Footnotes will be appended here -->
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<footer>
|
||||||
|
<p>Generated with ndg</p>
|
||||||
|
</footer>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
242
docs-preview-1431/tips.html
Normal file
242
docs-preview-1431/tips.html
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -606,7 +606,7 @@ Read more about it in the
|
||||||
<p>In the following example, we are creating a custom injection, to highlight the
|
<p>In the following example, we are creating a custom injection, to highlight the
|
||||||
Lua string after <code>mkLuaInline</code>.</p>
|
Lua string after <code>mkLuaInline</code>.</p>
|
||||||
<pre class="highlight"><code class="language-nix"><span style="color:rgb(97,175,239);">foo</span> <span style="color:rgb(171,178,191);">=</span> <span style="color:rgb(171,178,191);">mkLuaInline</span> <span style="color:rgb(152,195,121);">''</span><span style="color:rgb(152,195,121);"></span><br><span style="color:rgb(152,195,121);"> function bar()</span><br><span style="color:rgb(152,195,121);"> return 'foobar'</span><br><span style="color:rgb(152,195,121);"> end</span><br><span style="color:rgb(152,195,121);">''</span><span style="color:rgb(132,139,152);">;</span><br></code></pre>
|
<pre class="highlight"><code class="language-nix"><span style="color:rgb(97,175,239);">foo</span> <span style="color:rgb(171,178,191);">=</span> <span style="color:rgb(171,178,191);">mkLuaInline</span> <span style="color:rgb(152,195,121);">''</span><span style="color:rgb(152,195,121);"></span><br><span style="color:rgb(152,195,121);"> function bar()</span><br><span style="color:rgb(152,195,121);"> return 'foobar'</span><br><span style="color:rgb(152,195,121);"> end</span><br><span style="color:rgb(152,195,121);">''</span><span style="color:rgb(132,139,152);">;</span><br></code></pre>
|
||||||
<pre class="highlight"><code class="language-nix"><span style="color:rgb(132,139,152);">{</span><br> <span style="color:rgb(86,182,194);">vim</span><span style="color:rgb(132,139,152);">.</span><span style="color:rgb(86,182,194);">treesitter</span><span style="color:rgb(132,139,152);">.</span><span style="color:rgb(86,182,194);">queries</span> <span style="color:rgb(171,178,191);">=</span> <span style="color:rgb(132,139,152);">[</span><span style="color:rgb(132,139,152);">{</span><br> <span style="color:rgb(86,182,194);">type</span> <span style="color:rgb(171,178,191);">=</span> <span style="color:rgb(152,195,121);">"</span><span style="color:rgb(152,195,121);">injections</span><span style="color:rgb(152,195,121);">"</span><span style="color:rgb(132,139,152);">;</span><br> <span style="color:rgb(86,182,194);">filetypes</span> <span style="color:rgb(171,178,191);">=</span> <span style="color:rgb(132,139,152);">[</span><span style="color:rgb(152,195,121);">"</span><span style="color:rgb(152,195,121);">nix</span><span style="color:rgb(152,195,121);">"</span><span style="color:rgb(132,139,152);">]</span><span style="color:rgb(132,139,152);">;</span><br> <span style="color:rgb(86,182,194);">content</span> <span style="color:rgb(171,178,191);">=</span> <span style="color:rgb(152,195,121);">''</span><span style="color:rgb(152,195,121);"></span><br><span style="color:rgb(152,195,121);"> ;; extends</span><br><span style="color:rgb(152,195,121);"></span><br><span style="color:rgb(152,195,121);"> ((apply_expression</span><br><span style="color:rgb(152,195,121);"> function: (variable_expression</span><br><span style="color:rgb(152,195,121);"> name: (identifier) @_func</span><br><span style="color:rgb(152,195,121);"> (#eq? @_func "mkLuaInline"))</span><br><span style="color:rgb(152,195,121);"></span><br><span style="color:rgb(152,195,121);"> argument: (indented_string_expression</span><br><span style="color:rgb(152,195,121);"> (string_fragment) @injection.content)</span><br><span style="color:rgb(152,195,121);"></span><br><span style="color:rgb(152,195,121);"> (#set! injection.language "lua")</span><br><span style="color:rgb(152,195,121);"> (#set! injection.combined)))</span><br><span style="color:rgb(152,195,121);"> </span><span style="color:rgb(152,195,121);">''</span><span style="color:rgb(132,139,152);">;</span><br> <span style="color:rgb(132,139,152);">}</span><span style="color:rgb(132,139,152);">]</span><span style="color:rgb(132,139,152);">;</span><br><span style="color:rgb(132,139,152);">}</span><br></code></pre>
|
<pre class="highlight"><code class="language-nix"><span style="color:rgb(132,139,152);">{</span><br> <span style="color:rgb(86,182,194);">vim</span><span style="color:rgb(132,139,152);">.</span><span style="color:rgb(86,182,194);">treesitter</span><span style="color:rgb(132,139,152);">.</span><span style="color:rgb(86,182,194);">queries</span> <span style="color:rgb(171,178,191);">=</span> <span style="color:rgb(132,139,152);">[</span><span style="color:rgb(132,139,152);">{</span><br> <span style="color:rgb(86,182,194);">type</span> <span style="color:rgb(171,178,191);">=</span> <span style="color:rgb(152,195,121);">"</span><span style="color:rgb(152,195,121);">injections</span><span style="color:rgb(152,195,121);">"</span><span style="color:rgb(132,139,152);">;</span><br> <span style="color:rgb(86,182,194);">filetypes</span> <span style="color:rgb(171,178,191);">=</span> <span style="color:rgb(132,139,152);">[</span><span style="color:rgb(152,195,121);">"</span><span style="color:rgb(152,195,121);">nix</span><span style="color:rgb(152,195,121);">"</span><span style="color:rgb(132,139,152);">]</span><span style="color:rgb(132,139,152);">;</span><br> <span style="color:rgb(86,182,194);">query</span> <span style="color:rgb(171,178,191);">=</span> <span style="color:rgb(152,195,121);">''</span><span style="color:rgb(152,195,121);"></span><br><span style="color:rgb(152,195,121);"> ;; extends</span><br><span style="color:rgb(152,195,121);"></span><br><span style="color:rgb(152,195,121);"> ((apply_expression</span><br><span style="color:rgb(152,195,121);"> function: (variable_expression</span><br><span style="color:rgb(152,195,121);"> name: (identifier) @_func</span><br><span style="color:rgb(152,195,121);"> (#eq? @_func "mkLuaInline"))</span><br><span style="color:rgb(152,195,121);"></span><br><span style="color:rgb(152,195,121);"> argument: (indented_string_expression</span><br><span style="color:rgb(152,195,121);"> (string_fragment) @injection.content)</span><br><span style="color:rgb(152,195,121);"></span><br><span style="color:rgb(152,195,121);"> (#set! injection.language "lua")</span><br><span style="color:rgb(152,195,121);"> (#set! injection.combined)))</span><br><span style="color:rgb(152,195,121);"> </span><span style="color:rgb(152,195,121);">''</span><span style="color:rgb(132,139,152);">;</span><br> <span style="color:rgb(132,139,152);">}</span><span style="color:rgb(132,139,152);">]</span><span style="color:rgb(132,139,152);">;</span><br><span style="color:rgb(132,139,152);">}</span><br></code></pre>
|
||||||
<p>This will generate a <code>queries/nix/injections.scm</code> in a Neovim runtime directory.</p>
|
<p>This will generate a <code>queries/nix/injections.scm</code> in a Neovim runtime directory.</p>
|
||||||
<div class="admonition note">
|
<div class="admonition note">
|
||||||
<p class="admonition-title">Note</p>
|
<p class="admonition-title">Note</p>
|
||||||
|
|
|
||||||
|
|
@ -5335,7 +5335,7 @@
|
||||||
<details class="toc-category">
|
<details class="toc-category">
|
||||||
<summary title="vim.languages">
|
<summary title="vim.languages">
|
||||||
<span>vim.languages</span>
|
<span>vim.languages</span>
|
||||||
<span class="toc-count">514</span>
|
<span class="toc-count">515</span>
|
||||||
</summary>
|
</summary>
|
||||||
<ul>
|
<ul>
|
||||||
|
|
||||||
|
|
@ -6917,6 +6917,14 @@
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
<a href='#option-vim.languages.jinja.treesitter.injection' title="vim.languages.jinja.treesitter.injection">
|
||||||
|
jinja.treesitter.injection
|
||||||
|
|
||||||
|
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
<a href='#option-vim.languages.jinja.treesitter.inlinePackage' title="vim.languages.jinja.treesitter.inlinePackage">
|
<a href='#option-vim.languages.jinja.treesitter.inlinePackage' title="vim.languages.jinja.treesitter.inlinePackage">
|
||||||
jinja.treesitter.inlinePackage
|
jinja.treesitter.inlinePackage
|
||||||
|
|
@ -15385,7 +15393,7 @@
|
||||||
<details class="toc-category">
|
<details class="toc-category">
|
||||||
<summary title="vim.treesitter">
|
<summary title="vim.treesitter">
|
||||||
<span>vim.treesitter</span>
|
<span>vim.treesitter</span>
|
||||||
<span class="toc-count">25</span>
|
<span class="toc-count">26</span>
|
||||||
</summary>
|
</summary>
|
||||||
<ul>
|
<ul>
|
||||||
|
|
||||||
|
|
@ -15495,6 +15503,14 @@
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
<a href='#option-vim.treesitter.filetypeMappings' title="vim.treesitter.filetypeMappings">
|
||||||
|
filetypeMappings
|
||||||
|
|
||||||
|
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
<a href='#option-vim.treesitter.fold' title="vim.treesitter.fold">
|
<a href='#option-vim.treesitter.fold' title="vim.treesitter.fold">
|
||||||
fold
|
fold
|
||||||
|
|
@ -15552,16 +15568,16 @@
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
<a href='#option-vim.treesitter.queries._.content' title="vim.treesitter.queries.*.content">
|
<a href='#option-vim.treesitter.queries._.filetypes' title="vim.treesitter.queries.*.filetypes">
|
||||||
queries.*.content
|
queries.*.filetypes
|
||||||
|
|
||||||
|
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
<a href='#option-vim.treesitter.queries._.filetypes' title="vim.treesitter.queries.*.filetypes">
|
<a href='#option-vim.treesitter.queries._.query' title="vim.treesitter.queries.*.query">
|
||||||
queries.*.filetypes
|
queries.*.query
|
||||||
|
|
||||||
|
|
||||||
</a>
|
</a>
|
||||||
|
|
@ -30344,6 +30360,18 @@ not listed in the docs</p>
|
||||||
<div class="option-example">Example: <code>true</code></div>
|
<div class="option-example">Example: <code>true</code></div>
|
||||||
<div class="option-declared">Declared in: <code><a href="https://github.com/NotAShelf/nvf/blob/main/modules/plugins/languages/jinja.nix" target="_blank"><nvf/modules/plugins/languages/jinja.nix></a></code></div>
|
<div class="option-declared">Declared in: <code><a href="https://github.com/NotAShelf/nvf/blob/main/modules/plugins/languages/jinja.nix" target="_blank"><nvf/modules/plugins/languages/jinja.nix></a></code></div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="option" id="option-vim.languages.jinja.treesitter.injection">
|
||||||
|
<h3 class="option-name">
|
||||||
|
<a href="#option-vim.languages.jinja.treesitter.injection" class="option-anchor">vim.languages.jinja.treesitter.injection</a>
|
||||||
|
<span class="copy-link" title="Copy link to this option"></span>
|
||||||
|
<span class="copy-feedback">Link copied!</span>
|
||||||
|
</h3>
|
||||||
|
<div class="option-type">Type: <code>string</code></div>
|
||||||
|
<div class="option-description"><html><head></head><body><p>Treesitter language to inject in Jinja templates</p>
|
||||||
|
</body></html></div>
|
||||||
|
<div class="option-default">Default: <code>"html"</code></div>
|
||||||
|
<div class="option-declared">Declared in: <code><a href="https://github.com/NotAShelf/nvf/blob/main/modules/plugins/languages/jinja.nix" target="_blank"><nvf/modules/plugins/languages/jinja.nix></a></code></div>
|
||||||
|
</div>
|
||||||
<div class="option" id="option-vim.languages.jinja.treesitter.inlinePackage">
|
<div class="option" id="option-vim.languages.jinja.treesitter.inlinePackage">
|
||||||
<h3 class="option-name">
|
<h3 class="option-name">
|
||||||
<a href="#option-vim.languages.jinja.treesitter.inlinePackage" class="option-anchor">vim.languages.jinja.treesitter.inlinePackage</a>
|
<a href="#option-vim.languages.jinja.treesitter.inlinePackage" class="option-anchor">vim.languages.jinja.treesitter.inlinePackage</a>
|
||||||
|
|
@ -44491,6 +44519,26 @@ there are at least 2 lines above cursorline.</p>
|
||||||
<div class="option-example">Example: <code>true</code></div>
|
<div class="option-example">Example: <code>true</code></div>
|
||||||
<div class="option-declared">Declared in: <code><a href="https://github.com/NotAShelf/nvf/blob/main/modules/plugins/treesitter/treesitter.nix" target="_blank"><nvf/modules/plugins/treesitter/treesitter.nix></a></code></div>
|
<div class="option-declared">Declared in: <code><a href="https://github.com/NotAShelf/nvf/blob/main/modules/plugins/treesitter/treesitter.nix" target="_blank"><nvf/modules/plugins/treesitter/treesitter.nix></a></code></div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="option" id="option-vim.treesitter.filetypeMappings">
|
||||||
|
<h3 class="option-name">
|
||||||
|
<a href="#option-vim.treesitter.filetypeMappings" class="option-anchor">vim.treesitter.filetypeMappings</a>
|
||||||
|
<span class="copy-link" title="Copy link to this option"></span>
|
||||||
|
<span class="copy-feedback">Link copied!</span>
|
||||||
|
</h3>
|
||||||
|
<div class="option-type">Type: <code>attribute set of list of string</code></div>
|
||||||
|
<div class="option-description"><html><head></head><body><p>For each parser, registers a list of alternative filetypes.
|
||||||
|
For more information see <code>:h vim.treesitter.language.register()</code>.
|
||||||
|
See treesitter builtin mappings here: <<a href="https://github.com/nvim-treesitter/nvim-treesitter/blob/main/plugin/filetypes.lua">https://github.com/nvim-treesitter/nvim-treesitter/blob/main/plugin/filetypes.lua</a>></p>
|
||||||
|
</body></html></div>
|
||||||
|
<div class="option-default">Default: <code>{ }</code></div>
|
||||||
|
<div class="option-example">Example: <pre><code>{
|
||||||
|
sh = [
|
||||||
|
"ash"
|
||||||
|
"dash"
|
||||||
|
];
|
||||||
|
}</code></pre></div>
|
||||||
|
<div class="option-declared">Declared in: <code><a href="https://github.com/NotAShelf/nvf/blob/main/modules/plugins/treesitter/treesitter.nix" target="_blank"><nvf/modules/plugins/treesitter/treesitter.nix></a></code></div>
|
||||||
|
</div>
|
||||||
<div class="option" id="option-vim.treesitter.fold">
|
<div class="option" id="option-vim.treesitter.fold">
|
||||||
<h3 class="option-name">
|
<h3 class="option-name">
|
||||||
<a href="#option-vim.treesitter.fold" class="option-anchor">vim.treesitter.fold</a>
|
<a href="#option-vim.treesitter.fold" class="option-anchor">vim.treesitter.fold</a>
|
||||||
|
|
@ -44591,17 +44639,6 @@ the required grammars to this.</p>
|
||||||
<div class="option-default">Default: <code>[ ]</code></div>
|
<div class="option-default">Default: <code>[ ]</code></div>
|
||||||
<div class="option-declared">Declared in: <code><a href="https://github.com/NotAShelf/nvf/blob/main/modules/plugins/treesitter/treesitter.nix" target="_blank"><nvf/modules/plugins/treesitter/treesitter.nix></a></code></div>
|
<div class="option-declared">Declared in: <code><a href="https://github.com/NotAShelf/nvf/blob/main/modules/plugins/treesitter/treesitter.nix" target="_blank"><nvf/modules/plugins/treesitter/treesitter.nix></a></code></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="option" id="option-vim.treesitter.queries._.content">
|
|
||||||
<h3 class="option-name">
|
|
||||||
<a href="#option-vim.treesitter.queries._.content" class="option-anchor">vim.treesitter.queries.*.content</a>
|
|
||||||
<span class="copy-link" title="Copy link to this option"></span>
|
|
||||||
<span class="copy-feedback">Link copied!</span>
|
|
||||||
</h3>
|
|
||||||
<div class="option-type">Type: <code>strings concatenated with "\n"</code></div>
|
|
||||||
<div class="option-description"><html><head></head><body><p>The queries scm script.</p>
|
|
||||||
</body></html></div>
|
|
||||||
<div class="option-declared">Declared in: <code><a href="https://github.com/NotAShelf/nvf/blob/main/modules/plugins/treesitter/treesitter.nix" target="_blank"><nvf/modules/plugins/treesitter/treesitter.nix></a></code></div>
|
|
||||||
</div>
|
|
||||||
<div class="option" id="option-vim.treesitter.queries._.filetypes">
|
<div class="option" id="option-vim.treesitter.queries._.filetypes">
|
||||||
<h3 class="option-name">
|
<h3 class="option-name">
|
||||||
<a href="#option-vim.treesitter.queries._.filetypes" class="option-anchor">vim.treesitter.queries.*.filetypes</a>
|
<a href="#option-vim.treesitter.queries._.filetypes" class="option-anchor">vim.treesitter.queries.*.filetypes</a>
|
||||||
|
|
@ -44614,6 +44651,17 @@ the required grammars to this.</p>
|
||||||
<div class="option-default">Default: <code>[ ]</code></div>
|
<div class="option-default">Default: <code>[ ]</code></div>
|
||||||
<div class="option-declared">Declared in: <code><a href="https://github.com/NotAShelf/nvf/blob/main/modules/plugins/treesitter/treesitter.nix" target="_blank"><nvf/modules/plugins/treesitter/treesitter.nix></a></code></div>
|
<div class="option-declared">Declared in: <code><a href="https://github.com/NotAShelf/nvf/blob/main/modules/plugins/treesitter/treesitter.nix" target="_blank"><nvf/modules/plugins/treesitter/treesitter.nix></a></code></div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="option" id="option-vim.treesitter.queries._.query">
|
||||||
|
<h3 class="option-name">
|
||||||
|
<a href="#option-vim.treesitter.queries._.query" class="option-anchor">vim.treesitter.queries.*.query</a>
|
||||||
|
<span class="copy-link" title="Copy link to this option"></span>
|
||||||
|
<span class="copy-feedback">Link copied!</span>
|
||||||
|
</h3>
|
||||||
|
<div class="option-type">Type: <code>strings concatenated with "\n"</code></div>
|
||||||
|
<div class="option-description"><html><head></head><body><p>The queries scm script.</p>
|
||||||
|
</body></html></div>
|
||||||
|
<div class="option-declared">Declared in: <code><a href="https://github.com/NotAShelf/nvf/blob/main/modules/plugins/treesitter/treesitter.nix" target="_blank"><nvf/modules/plugins/treesitter/treesitter.nix></a></code></div>
|
||||||
|
</div>
|
||||||
<div class="option" id="option-vim.treesitter.queries._.type">
|
<div class="option" id="option-vim.treesitter.queries._.type">
|
||||||
<h3 class="option-name">
|
<h3 class="option-name">
|
||||||
<a href="#option-vim.treesitter.queries._.type" class="option-anchor">vim.treesitter.queries.*.type</a>
|
<a href="#option-vim.treesitter.queries._.type" class="option-anchor">vim.treesitter.queries.*.type</a>
|
||||||
|
|
|
||||||
|
|
@ -468,14 +468,31 @@ formatter.</p>
|
||||||
<p>Added <a class="option-reference" href="options.html#option-vim.treesitter.queries"><code class="nixos-option">vim.treesitter.queries</code></a> to support adding custom queries.</p>
|
<p>Added <a class="option-reference" href="options.html#option-vim.treesitter.queries"><code class="nixos-option">vim.treesitter.queries</code></a> to support adding custom queries.</p>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<p>Added injections for <code>vim.treesitter.queries.*.content</code> as <code>query</code> and
|
<p>Added injections for <code>query = '' ... ''</code> as <code>query</code> and <code>mkLualine '' ... ''</code>,
|
||||||
<code>mkLualine</code>, <code>entryAnywhere</code>, <code>entryBefore</code>, <code>entryAfter</code> as <code>lua</code> in nix.</p>
|
<code>entryAnywhere '' ... ''</code>, <code>entryBefore ] '' ... ''</code>,
|
||||||
|
<code>entryAfter ] '' ... ''</code> as <code>lua</code> in nix.</p>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<p>Added <a class="option-reference" href="options.html#option-vim.languages.tera.treesitter.injection"><code class="nixos-option">vim.languages.tera.treesitter.injection</code></a> to configure, what
|
<p>Added <a class="option-reference" href="options.html#option-vim.languages.tera.treesitter.injection"><code class="nixos-option">vim.languages.tera.treesitter.injection</code></a> to configure, what
|
||||||
language the content is.</p>
|
language the content is.</p>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
|
<p>Added <a class="option-reference" href="options.html#option-vim.languages.jinja.treesitter.injection"><code class="nixos-option">vim.languages.jinja.treesitter.injection</code></a> to configure, what
|
||||||
|
language the content is.</p>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<p>Added <a class="option-reference" href="options.html#option-vim.treesitter.filetypeMappings"><code class="nixos-option">vim.treesitter.filetypeMappings</code></a> to support mappings similar to
|
||||||
|
<a href="https://github.com/nvim-treesitter/nvim-treesitter/blob/main/plugin/filetypes.lua">https://github.com/nvim-treesitter/nvim-treesitter/blob/main/plugin/filetypes.lua</a>.
|
||||||
|
This is mostly use full for Markdown code block injections.</p>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<p>Added some Tree-sitter filetype mappings for:</p>
|
||||||
|
<ul>
|
||||||
|
<li><code>bash</code> = <code>ash</code>, <code>dash</code>, <code>zsh</code></li>
|
||||||
|
<li><code>yaml</code> = <code>yaml</code></li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
<p>Added <code>vim.lsp.presets.<name></code> to contain LSP configurations. This allows for
|
<p>Added <code>vim.lsp.presets.<name></code> to contain LSP configurations. This allows for
|
||||||
more flexibility in nvf and reuse of LSPs across languages. Dropped
|
more flexibility in nvf and reuse of LSPs across languages. Dropped
|
||||||
<code>deprecatedSingleOrListOf</code> in favor of <code>listOf</code> for the affected LSP options.</p>
|
<code>deprecatedSingleOrListOf</code> in favor of <code>listOf</code> for the affected LSP options.</p>
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
1062
docs-preview-1545/assets/main.js
Normal file
1062
docs-preview-1545/assets/main.js
Normal file
File diff suppressed because it is too large
Load diff
1
docs-preview-1545/assets/search-data.json
Normal file
1
docs-preview-1545/assets/search-data.json
Normal file
File diff suppressed because one or more lines are too long
298
docs-preview-1545/assets/search-worker.js
Normal file
298
docs-preview-1545/assets/search-worker.js
Normal file
|
|
@ -0,0 +1,298 @@
|
||||||
|
const isWordBoundary = (char) =>
|
||||||
|
/[A-Z]/.test(char) || /[-_\/.]/.test(char) || /\s/.test(char);
|
||||||
|
|
||||||
|
const isCaseTransition = (prev, curr) => {
|
||||||
|
const prevIsUpper = prev.toLowerCase() !== prev;
|
||||||
|
const currIsUpper = curr.toLowerCase() !== curr;
|
||||||
|
return (
|
||||||
|
prevIsUpper && currIsUpper && prev.toLowerCase() !== curr.toLowerCase()
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
const findBestSubsequenceMatch = (query, target) => {
|
||||||
|
const n = query.length;
|
||||||
|
const m = target.length;
|
||||||
|
|
||||||
|
if (n === 0 || m === 0) return null;
|
||||||
|
|
||||||
|
const positions = [];
|
||||||
|
|
||||||
|
const memo = new Map();
|
||||||
|
const key = (qIdx, tIdx, gap) => `${qIdx}:${tIdx}:${gap}`;
|
||||||
|
|
||||||
|
const findBest = (qIdx, tIdx, currentGap) => {
|
||||||
|
if (qIdx === n) {
|
||||||
|
return { done: true, positions: [...positions], gap: currentGap };
|
||||||
|
}
|
||||||
|
|
||||||
|
const memoKey = key(qIdx, tIdx, currentGap);
|
||||||
|
if (memo.has(memoKey)) {
|
||||||
|
return memo.get(memoKey);
|
||||||
|
}
|
||||||
|
|
||||||
|
let bestResult = null;
|
||||||
|
|
||||||
|
for (let i = tIdx; i < m; i++) {
|
||||||
|
if (target[i] === query[qIdx]) {
|
||||||
|
positions.push(i);
|
||||||
|
const gap = qIdx === 0 ? 0 : i - positions[positions.length - 2] - 1;
|
||||||
|
const newGap = currentGap + gap;
|
||||||
|
|
||||||
|
if (newGap > m) {
|
||||||
|
positions.pop();
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
const result = findBest(qIdx + 1, i + 1, newGap);
|
||||||
|
positions.pop();
|
||||||
|
|
||||||
|
if (result && (!bestResult || result.gap < bestResult.gap)) {
|
||||||
|
bestResult = result;
|
||||||
|
if (result.gap === 0) break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
memo.set(memoKey, bestResult);
|
||||||
|
return bestResult;
|
||||||
|
};
|
||||||
|
|
||||||
|
const result = findBest(0, 0, 0);
|
||||||
|
if (!result) return null;
|
||||||
|
|
||||||
|
const consecutive = (() => {
|
||||||
|
let c = 1;
|
||||||
|
for (let i = 1; i < result.positions.length; i++) {
|
||||||
|
if (result.positions[i] === result.positions[i - 1] + 1) {
|
||||||
|
c++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return c;
|
||||||
|
})();
|
||||||
|
|
||||||
|
return {
|
||||||
|
positions: result.positions,
|
||||||
|
consecutive,
|
||||||
|
score: calculateMatchScore(query, target, result.positions, consecutive),
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
const calculateMatchScore = (query, target, positions, consecutive) => {
|
||||||
|
const n = positions.length;
|
||||||
|
const m = target.length;
|
||||||
|
|
||||||
|
if (n === 0) return 0;
|
||||||
|
|
||||||
|
let score = 1.0;
|
||||||
|
|
||||||
|
const startBonus = (m - positions[0]) / m;
|
||||||
|
score += startBonus * 0.5;
|
||||||
|
|
||||||
|
let gapPenalty = 0;
|
||||||
|
for (let i = 1; i < n; i++) {
|
||||||
|
const gap = positions[i] - positions[i - 1] - 1;
|
||||||
|
if (gap > 0) {
|
||||||
|
gapPenalty += Math.min(gap / m, 1.0) * 0.3;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
score -= gapPenalty;
|
||||||
|
|
||||||
|
const consecutiveBonus = consecutive / n;
|
||||||
|
score += consecutiveBonus * 0.3;
|
||||||
|
|
||||||
|
let boundaryBonus = 0;
|
||||||
|
for (let i = 0; i < n; i++) {
|
||||||
|
const char = target[positions[i]];
|
||||||
|
if (i === 0 || isWordBoundary(char)) {
|
||||||
|
boundaryBonus += 0.05;
|
||||||
|
}
|
||||||
|
if (i > 0) {
|
||||||
|
const prevChar = target[positions[i - 1]];
|
||||||
|
if (isCaseTransition(prevChar, char)) {
|
||||||
|
boundaryBonus += 0.03;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
score = Math.min(1.0, score + boundaryBonus);
|
||||||
|
|
||||||
|
const lengthPenalty = Math.abs(query.length - n) / Math.max(query.length, m);
|
||||||
|
score -= lengthPenalty * 0.2;
|
||||||
|
|
||||||
|
return Math.max(0, Math.min(1.0, score));
|
||||||
|
};
|
||||||
|
|
||||||
|
const fuzzyMatch = (query, target) => {
|
||||||
|
const lowerQuery = query.toLowerCase();
|
||||||
|
const lowerTarget = target.toLowerCase();
|
||||||
|
|
||||||
|
if (lowerQuery.length === 0) return null;
|
||||||
|
if (lowerTarget.length === 0) return null;
|
||||||
|
|
||||||
|
if (lowerTarget === lowerQuery) {
|
||||||
|
return 1.0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (lowerTarget.includes(lowerQuery)) {
|
||||||
|
const ratio = lowerQuery.length / lowerTarget.length;
|
||||||
|
return 0.8 + ratio * 0.2;
|
||||||
|
}
|
||||||
|
|
||||||
|
const match = findBestSubsequenceMatch(lowerQuery, lowerTarget);
|
||||||
|
if (!match) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return Math.min(1.0, match.score);
|
||||||
|
};
|
||||||
|
|
||||||
|
self.onmessage = function (e) {
|
||||||
|
const { messageId, type, data } = e.data;
|
||||||
|
|
||||||
|
const respond = (type, data) => {
|
||||||
|
self.postMessage({ messageId, type, data });
|
||||||
|
};
|
||||||
|
|
||||||
|
const respondError = (error) => {
|
||||||
|
self.postMessage({
|
||||||
|
messageId,
|
||||||
|
type: "error",
|
||||||
|
error: error.message || String(error),
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
try {
|
||||||
|
if (type === "tokenize") {
|
||||||
|
const text = typeof data === "string" ? data : "";
|
||||||
|
const words = text.toLowerCase().match(/\b[a-zA-Z0-9_-]+\b/g) || [];
|
||||||
|
const tokens = words.filter((word) => word.length > 2);
|
||||||
|
const uniqueTokens = Array.from(new Set(tokens));
|
||||||
|
respond("tokens", uniqueTokens);
|
||||||
|
} else if (type === "search") {
|
||||||
|
const { query, limit = 10 } = data;
|
||||||
|
|
||||||
|
if (!query || typeof query !== "string") {
|
||||||
|
respond("results", []);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const rawQuery = query.toLowerCase();
|
||||||
|
const text = typeof query === "string" ? query : "";
|
||||||
|
const words = text.toLowerCase().match(/\b[a-zA-Z0-9_-]+\b/g) || [];
|
||||||
|
const searchTerms = words.filter((word) => word.length > 2);
|
||||||
|
|
||||||
|
let documents = [];
|
||||||
|
if (typeof data.documents === "string") {
|
||||||
|
documents = JSON.parse(data.documents);
|
||||||
|
} else if (Array.isArray(data.documents)) {
|
||||||
|
documents = data.documents;
|
||||||
|
} else if (typeof data.transferables === "string") {
|
||||||
|
documents = JSON.parse(data.transferables);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!Array.isArray(documents) || documents.length === 0) {
|
||||||
|
respond("results", []);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const useFuzzySearch = rawQuery.length >= 3;
|
||||||
|
|
||||||
|
if (searchTerms.length === 0 && rawQuery.length < 3) {
|
||||||
|
respond("results", []);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const pageMatches = new Map();
|
||||||
|
|
||||||
|
// Pre-compute lower-case strings for each document
|
||||||
|
const processedDocs = documents.map((doc, docId) => {
|
||||||
|
const title = typeof doc.title === "string" ? doc.title : "";
|
||||||
|
const content = typeof doc.content === "string" ? doc.content : "";
|
||||||
|
|
||||||
|
return {
|
||||||
|
docId,
|
||||||
|
doc,
|
||||||
|
lowerTitle: title.toLowerCase(),
|
||||||
|
lowerContent: content.toLowerCase(),
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
|
// First pass: Score pages with fuzzy matching
|
||||||
|
processedDocs.forEach(({ docId, doc, lowerTitle, lowerContent }) => {
|
||||||
|
let match = pageMatches.get(docId);
|
||||||
|
if (!match) {
|
||||||
|
match = { doc, pageScore: 0, matchingAnchors: [] };
|
||||||
|
pageMatches.set(docId, match);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (useFuzzySearch) {
|
||||||
|
const fuzzyTitleScore = fuzzyMatch(rawQuery, lowerTitle);
|
||||||
|
if (fuzzyTitleScore !== null) {
|
||||||
|
match.pageScore += fuzzyTitleScore * 100;
|
||||||
|
}
|
||||||
|
|
||||||
|
const fuzzyContentScore = fuzzyMatch(rawQuery, lowerContent);
|
||||||
|
if (fuzzyContentScore !== null) {
|
||||||
|
match.pageScore += fuzzyContentScore * 30;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Token-based exact matching
|
||||||
|
searchTerms.forEach((term) => {
|
||||||
|
if (lowerTitle.includes(term)) {
|
||||||
|
match.pageScore += lowerTitle === term ? 20 : 10;
|
||||||
|
}
|
||||||
|
if (lowerContent.includes(term)) {
|
||||||
|
match.pageScore += 2;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
// Second pass: Find matching anchors
|
||||||
|
pageMatches.forEach((match) => {
|
||||||
|
const doc = match.doc;
|
||||||
|
if (
|
||||||
|
!doc.anchors ||
|
||||||
|
!Array.isArray(doc.anchors) ||
|
||||||
|
doc.anchors.length === 0
|
||||||
|
) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
doc.anchors.forEach((anchor) => {
|
||||||
|
if (!anchor || !anchor.text) return;
|
||||||
|
|
||||||
|
const anchorText = anchor.text.toLowerCase();
|
||||||
|
let anchorMatches = false;
|
||||||
|
|
||||||
|
if (useFuzzySearch) {
|
||||||
|
const fuzzyScore = fuzzyMatch(rawQuery, anchorText);
|
||||||
|
if (fuzzyScore !== null && fuzzyScore >= 0.4) {
|
||||||
|
anchorMatches = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!anchorMatches) {
|
||||||
|
searchTerms.forEach((term) => {
|
||||||
|
if (anchorText.includes(term)) {
|
||||||
|
anchorMatches = true;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if (anchorMatches) {
|
||||||
|
match.matchingAnchors.push(anchor);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
const results = Array.from(pageMatches.values())
|
||||||
|
.filter((m) => m.pageScore > 5)
|
||||||
|
.sort((a, b) => b.pageScore - a.pageScore)
|
||||||
|
.slice(0, limit);
|
||||||
|
|
||||||
|
respond("results", results);
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
respondError(error);
|
||||||
|
}
|
||||||
|
};
|
||||||
1747
docs-preview-1545/assets/search.js
Normal file
1747
docs-preview-1545/assets/search.js
Normal file
File diff suppressed because it is too large
Load diff
2539
docs-preview-1545/assets/style.css
Normal file
2539
docs-preview-1545/assets/style.css
Normal file
File diff suppressed because it is too large
Load diff
667
docs-preview-1545/configuring.html
Normal file
667
docs-preview-1545/configuring.html
Normal file
File diff suppressed because one or more lines are too long
540
docs-preview-1545/hacking.html
Normal file
540
docs-preview-1545/hacking.html
Normal file
File diff suppressed because one or more lines are too long
400
docs-preview-1545/index.html
Normal file
400
docs-preview-1545/index.html
Normal file
File diff suppressed because one or more lines are too long
51515
docs-preview-1545/options.html
Normal file
51515
docs-preview-1545/options.html
Normal file
File diff suppressed because it is too large
Load diff
157
docs-preview-1545/quirks.html
Normal file
157
docs-preview-1545/quirks.html
Normal file
|
|
@ -0,0 +1,157 @@
|
||||||
|
<!doctype html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
|
<title>Known Issues and Quirks</title>
|
||||||
|
|
||||||
|
|
||||||
|
<script>
|
||||||
|
// Apply sidebar state immediately to prevent flash
|
||||||
|
(function () {
|
||||||
|
try {
|
||||||
|
if (localStorage.getItem("sidebar-collapsed") === "true") {
|
||||||
|
document.documentElement.classList.add("sidebar-collapsed");
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
// localStorage unavailable
|
||||||
|
}
|
||||||
|
})();
|
||||||
|
</script>
|
||||||
|
<link rel="stylesheet" href="assets/style.css" />
|
||||||
|
<script defer src="assets/main.js"></script>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
window.searchNamespace = window.searchNamespace || {};
|
||||||
|
window.searchNamespace.rootPath = "";
|
||||||
|
</script>
|
||||||
|
<script defer src="assets/search.js"></script>
|
||||||
|
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="container">
|
||||||
|
<header>
|
||||||
|
<div class="header-left">
|
||||||
|
<h1 class="site-title">
|
||||||
|
<a href="index.html">NVF</a>
|
||||||
|
</h1>
|
||||||
|
|
||||||
|
<nav class="header-nav">
|
||||||
|
<ul>
|
||||||
|
<li >
|
||||||
|
<a href="options.html">Options</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li><a href="search.html">Search</a></li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="search-container">
|
||||||
|
<input type="text" id="search-input" placeholder="Search..." />
|
||||||
|
<div id="search-results" class="search-results"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<div class="layout">
|
||||||
|
<div class="sidebar-toggle" aria-label="Toggle sidebar">
|
||||||
|
<svg
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
viewBox="0 0 24 24"
|
||||||
|
width="24"
|
||||||
|
height="24"
|
||||||
|
>
|
||||||
|
<path d="M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"></path>
|
||||||
|
</svg>
|
||||||
|
</div>
|
||||||
|
<nav class="sidebar">
|
||||||
|
<details class="sidebar-section" data-section="docs" open>
|
||||||
|
<summary>Documents</summary>
|
||||||
|
<div class="sidebar-section-content">
|
||||||
|
<ul>
|
||||||
|
<li><a href="index.html">Introduction</a></li>
|
||||||
|
<li><a href="configuring.html">Configuring nvf</a></li>
|
||||||
|
<li><a href="hacking.html">Hacking nvf</a></li>
|
||||||
|
<li><a href="tips.html">Helpful Tips</a></li>
|
||||||
|
<li><a href="quirks.html">Known Issues and Quirks</a></li>
|
||||||
|
<li><a href="release-notes.html">Release Notes</a></li>
|
||||||
|
<li><a href="search.html">Search</a></li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</details>
|
||||||
|
|
||||||
|
<details class="sidebar-section" data-section="toc" open>
|
||||||
|
<summary>Contents</summary>
|
||||||
|
<div class="sidebar-section-content">
|
||||||
|
<ul class="toc-list">
|
||||||
|
<li><a href="#ch-known-issues-quirks">Known Issues and Quirks</a>
|
||||||
|
<ul><li><a href="#ch-quirks-nodejs">NodeJS</a>
|
||||||
|
<ul><li><a href="#sec-eslint-plugin-prettier">eslint-plugin-prettier</a>
|
||||||
|
</ul><li><a href="#ch-bugs-suggestions">Bugs & Suggestions</a>
|
||||||
|
</li></ul></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</details>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<main class="content"><html><head></head><body><h1 id="ch-known-issues-quirks">Known Issues and Quirks</h1>
|
||||||
|
<p>At times, certain plugins and modules may refuse to play nicely with your setup,
|
||||||
|
be it a result of generating Lua from Nix, or the state of packaging. This page,
|
||||||
|
in turn, will list any known modules or plugins that are known to misbehave, and
|
||||||
|
possible workarounds that you may apply.</p>
|
||||||
|
<h2 id="ch-quirks-nodejs">NodeJS</h2>
|
||||||
|
<h3 id="sec-eslint-plugin-prettier">eslint-plugin-prettier</h3>
|
||||||
|
<p>When working with NodeJS, which is <em>obviously</em> known for its meticulous
|
||||||
|
standards, most things are bound to work as expected but some projects, tools
|
||||||
|
and settings may fool the default configurations of tools provided by <strong>nvf</strong>.</p>
|
||||||
|
<p>If <a href="https://github.com/prettier/eslint-plugin-prettier">eslint-plugin-prettier</a> or similar is included, you might get a situation
|
||||||
|
where your Eslint configuration diagnoses your formatting according to its own
|
||||||
|
config (usually <code>.eslintrc.js</code>). The issue there is your formatting is made via
|
||||||
|
prettierd.</p>
|
||||||
|
<p>This results in auto-formatting relying on your prettier configuration, while
|
||||||
|
your Eslint configuration diagnoses formatting "issues" while it's
|
||||||
|
<a href="https://prettier.io/docs/en/comparison.html">not supposed to</a>. In the end, you get discrepancies between what your editor
|
||||||
|
does and what it wants.</p>
|
||||||
|
<p>Solutions are:</p>
|
||||||
|
<ol>
|
||||||
|
<li>Don't add a formatting config to Eslint, instead separate Prettier and
|
||||||
|
Eslint.</li>
|
||||||
|
<li>PR the repo in question to add an ESLint formatter, and configure <strong>nvf</strong> to
|
||||||
|
use it.</li>
|
||||||
|
</ol>
|
||||||
|
<h2 id="ch-bugs-suggestions">Bugs & Suggestions</h2>
|
||||||
|
<p>Some quirks are not exactly quirks, but bugs in the module system. If you notice
|
||||||
|
any issues with <strong>nvf</strong>, or this documentation, then please consider reporting
|
||||||
|
them over at the <a href="https://github.com/notashelf/nvf/issues">issue tracker</a>. Issues tab, in addition to the
|
||||||
|
<a href="https://github.com/notashelf/nvf/discussions">discussions tab</a> is a good place as any to request new features.</p>
|
||||||
|
<p>You may also consider submitting bug fixes, feature additions and upstreamed
|
||||||
|
changes that you think are critical over at the <a href="https://github.com/notashelf/nvf/pulls">pull requests tab</a>.</p>
|
||||||
|
</body></html></main>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<aside class="page-toc">
|
||||||
|
<nav class="page-toc-nav">
|
||||||
|
<h3>On this page</h3>
|
||||||
|
<ul class="page-toc-list">
|
||||||
|
<li><a href="#ch-known-issues-quirks">Known Issues and Quirks</a>
|
||||||
|
<ul><li><a href="#ch-quirks-nodejs">NodeJS</a>
|
||||||
|
<ul><li><a href="#sec-eslint-plugin-prettier">eslint-plugin-prettier</a>
|
||||||
|
</ul><li><a href="#ch-bugs-suggestions">Bugs & Suggestions</a>
|
||||||
|
</li></ul></li>
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
</aside>
|
||||||
|
|
||||||
|
<footer>
|
||||||
|
<p>Generated with ndg</p>
|
||||||
|
</footer>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
2482
docs-preview-1545/release-notes.html
Normal file
2482
docs-preview-1545/release-notes.html
Normal file
File diff suppressed because one or more lines are too long
140
docs-preview-1545/search.html
Normal file
140
docs-preview-1545/search.html
Normal file
|
|
@ -0,0 +1,140 @@
|
||||||
|
<!doctype html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
|
<title>NVF - Search</title>
|
||||||
|
|
||||||
|
|
||||||
|
<script>
|
||||||
|
// Apply sidebar state immediately to prevent flash
|
||||||
|
(function () {
|
||||||
|
try {
|
||||||
|
if (localStorage.getItem("sidebar-collapsed") === "true") {
|
||||||
|
document.documentElement.classList.add("sidebar-collapsed");
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
// localStorage unavailable
|
||||||
|
}
|
||||||
|
})();
|
||||||
|
</script>
|
||||||
|
<link rel="stylesheet" href="assets/style.css" />
|
||||||
|
<script defer src="assets/main.js"></script>
|
||||||
|
<script>
|
||||||
|
window.searchNamespace = window.searchNamespace || {};
|
||||||
|
window.searchNamespace.rootPath = "";
|
||||||
|
</script>
|
||||||
|
<script defer src="assets/search.js"></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="container">
|
||||||
|
<header>
|
||||||
|
<div class="header-left">
|
||||||
|
<h1 class="site-title">
|
||||||
|
<a href="index.html">NVF</a>
|
||||||
|
</h1>
|
||||||
|
</div>
|
||||||
|
<nav class="header-nav">
|
||||||
|
<ul>
|
||||||
|
<li >
|
||||||
|
<a href="options.html">Options</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li><a href="search.html">Search</a></li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<div class="search-container">
|
||||||
|
<input
|
||||||
|
type="search"
|
||||||
|
id="search-input"
|
||||||
|
placeholder="Search..."
|
||||||
|
aria-label="Search"
|
||||||
|
autocomplete="off"
|
||||||
|
/>
|
||||||
|
<div
|
||||||
|
id="search-results"
|
||||||
|
class="search-results"
|
||||||
|
role="region"
|
||||||
|
aria-live="polite"
|
||||||
|
aria-label="Search results"
|
||||||
|
></div>
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<div class="layout">
|
||||||
|
<div class="sidebar-toggle" aria-label="Toggle sidebar">
|
||||||
|
<svg
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
viewBox="0 0 24 24"
|
||||||
|
width="24"
|
||||||
|
height="24"
|
||||||
|
>
|
||||||
|
<path d="M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"></path>
|
||||||
|
</svg>
|
||||||
|
</div>
|
||||||
|
<nav id="sidebar" class="sidebar">
|
||||||
|
<div class="docs-nav">
|
||||||
|
<h2>Documents</h2>
|
||||||
|
<ul>
|
||||||
|
<li><a href="index.html">Introduction</a></li>
|
||||||
|
<li><a href="configuring.html">Configuring nvf</a></li>
|
||||||
|
<li><a href="hacking.html">Hacking nvf</a></li>
|
||||||
|
<li><a href="tips.html">Helpful Tips</a></li>
|
||||||
|
<li><a href="quirks.html">Known Issues and Quirks</a></li>
|
||||||
|
<li><a href="release-notes.html">Release Notes</a></li>
|
||||||
|
<li><a href="search.html">Search</a></li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="toc">
|
||||||
|
<h2>Contents</h2>
|
||||||
|
<ul class="toc-list">
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<main class="content">
|
||||||
|
<h1>Search</h1>
|
||||||
|
<div class="search-page">
|
||||||
|
<div class="search-form">
|
||||||
|
<input
|
||||||
|
type="search"
|
||||||
|
id="search-page-input"
|
||||||
|
placeholder="Search..."
|
||||||
|
aria-label="Search"
|
||||||
|
autocomplete="off"
|
||||||
|
autofocus
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div class="search-keyboard-hints" role="note" aria-label="Keyboard shortcuts">
|
||||||
|
<span class="hint-item"><kbd>↑</kbd> <kbd>↓</kbd> to navigate</span>
|
||||||
|
<span class="hint-item"><kbd>Enter</kbd> to select</span>
|
||||||
|
<span class="hint-item"><kbd>Esc</kbd> to clear</span>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
id="search-page-results"
|
||||||
|
class="search-page-results"
|
||||||
|
role="region"
|
||||||
|
aria-live="polite"
|
||||||
|
aria-label="Search results"
|
||||||
|
></div>
|
||||||
|
</div>
|
||||||
|
<div class="footnotes-container">
|
||||||
|
<!-- Footnotes will be appended here -->
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<footer>
|
||||||
|
<p>Generated with ndg</p>
|
||||||
|
</footer>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
242
docs-preview-1545/tips.html
Normal file
242
docs-preview-1545/tips.html
Normal file
File diff suppressed because one or more lines are too long
82
options.html
82
options.html
|
|
@ -5335,7 +5335,7 @@
|
||||||
<details class="toc-category">
|
<details class="toc-category">
|
||||||
<summary title="vim.languages">
|
<summary title="vim.languages">
|
||||||
<span>vim.languages</span>
|
<span>vim.languages</span>
|
||||||
<span class="toc-count">514</span>
|
<span class="toc-count">515</span>
|
||||||
</summary>
|
</summary>
|
||||||
<ul>
|
<ul>
|
||||||
|
|
||||||
|
|
@ -6917,6 +6917,14 @@
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
<a href='#option-vim.languages.jinja.treesitter.injection' title="vim.languages.jinja.treesitter.injection">
|
||||||
|
jinja.treesitter.injection
|
||||||
|
|
||||||
|
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
<a href='#option-vim.languages.jinja.treesitter.inlinePackage' title="vim.languages.jinja.treesitter.inlinePackage">
|
<a href='#option-vim.languages.jinja.treesitter.inlinePackage' title="vim.languages.jinja.treesitter.inlinePackage">
|
||||||
jinja.treesitter.inlinePackage
|
jinja.treesitter.inlinePackage
|
||||||
|
|
@ -15385,7 +15393,7 @@
|
||||||
<details class="toc-category">
|
<details class="toc-category">
|
||||||
<summary title="vim.treesitter">
|
<summary title="vim.treesitter">
|
||||||
<span>vim.treesitter</span>
|
<span>vim.treesitter</span>
|
||||||
<span class="toc-count">25</span>
|
<span class="toc-count">26</span>
|
||||||
</summary>
|
</summary>
|
||||||
<ul>
|
<ul>
|
||||||
|
|
||||||
|
|
@ -15495,6 +15503,14 @@
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
<a href='#option-vim.treesitter.filetypeMappings' title="vim.treesitter.filetypeMappings">
|
||||||
|
filetypeMappings
|
||||||
|
|
||||||
|
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
<a href='#option-vim.treesitter.fold' title="vim.treesitter.fold">
|
<a href='#option-vim.treesitter.fold' title="vim.treesitter.fold">
|
||||||
fold
|
fold
|
||||||
|
|
@ -15552,16 +15568,16 @@
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
<a href='#option-vim.treesitter.queries._.content' title="vim.treesitter.queries.*.content">
|
<a href='#option-vim.treesitter.queries._.filetypes' title="vim.treesitter.queries.*.filetypes">
|
||||||
queries.*.content
|
queries.*.filetypes
|
||||||
|
|
||||||
|
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
<a href='#option-vim.treesitter.queries._.filetypes' title="vim.treesitter.queries.*.filetypes">
|
<a href='#option-vim.treesitter.queries._.query' title="vim.treesitter.queries.*.query">
|
||||||
queries.*.filetypes
|
queries.*.query
|
||||||
|
|
||||||
|
|
||||||
</a>
|
</a>
|
||||||
|
|
@ -30344,6 +30360,18 @@ not listed in the docs</p>
|
||||||
<div class="option-example">Example: <code>true</code></div>
|
<div class="option-example">Example: <code>true</code></div>
|
||||||
<div class="option-declared">Declared in: <code><a href="https://github.com/NotAShelf/nvf/blob/main/modules/plugins/languages/jinja.nix" target="_blank"><nvf/modules/plugins/languages/jinja.nix></a></code></div>
|
<div class="option-declared">Declared in: <code><a href="https://github.com/NotAShelf/nvf/blob/main/modules/plugins/languages/jinja.nix" target="_blank"><nvf/modules/plugins/languages/jinja.nix></a></code></div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="option" id="option-vim.languages.jinja.treesitter.injection">
|
||||||
|
<h3 class="option-name">
|
||||||
|
<a href="#option-vim.languages.jinja.treesitter.injection" class="option-anchor">vim.languages.jinja.treesitter.injection</a>
|
||||||
|
<span class="copy-link" title="Copy link to this option"></span>
|
||||||
|
<span class="copy-feedback">Link copied!</span>
|
||||||
|
</h3>
|
||||||
|
<div class="option-type">Type: <code>string</code></div>
|
||||||
|
<div class="option-description"><html><head></head><body><p>Treesitter language to inject in Jinja templates</p>
|
||||||
|
</body></html></div>
|
||||||
|
<div class="option-default">Default: <code>"html"</code></div>
|
||||||
|
<div class="option-declared">Declared in: <code><a href="https://github.com/NotAShelf/nvf/blob/main/modules/plugins/languages/jinja.nix" target="_blank"><nvf/modules/plugins/languages/jinja.nix></a></code></div>
|
||||||
|
</div>
|
||||||
<div class="option" id="option-vim.languages.jinja.treesitter.inlinePackage">
|
<div class="option" id="option-vim.languages.jinja.treesitter.inlinePackage">
|
||||||
<h3 class="option-name">
|
<h3 class="option-name">
|
||||||
<a href="#option-vim.languages.jinja.treesitter.inlinePackage" class="option-anchor">vim.languages.jinja.treesitter.inlinePackage</a>
|
<a href="#option-vim.languages.jinja.treesitter.inlinePackage" class="option-anchor">vim.languages.jinja.treesitter.inlinePackage</a>
|
||||||
|
|
@ -44491,6 +44519,26 @@ there are at least 2 lines above cursorline.</p>
|
||||||
<div class="option-example">Example: <code>true</code></div>
|
<div class="option-example">Example: <code>true</code></div>
|
||||||
<div class="option-declared">Declared in: <code><a href="https://github.com/NotAShelf/nvf/blob/main/modules/plugins/treesitter/treesitter.nix" target="_blank"><nvf/modules/plugins/treesitter/treesitter.nix></a></code></div>
|
<div class="option-declared">Declared in: <code><a href="https://github.com/NotAShelf/nvf/blob/main/modules/plugins/treesitter/treesitter.nix" target="_blank"><nvf/modules/plugins/treesitter/treesitter.nix></a></code></div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="option" id="option-vim.treesitter.filetypeMappings">
|
||||||
|
<h3 class="option-name">
|
||||||
|
<a href="#option-vim.treesitter.filetypeMappings" class="option-anchor">vim.treesitter.filetypeMappings</a>
|
||||||
|
<span class="copy-link" title="Copy link to this option"></span>
|
||||||
|
<span class="copy-feedback">Link copied!</span>
|
||||||
|
</h3>
|
||||||
|
<div class="option-type">Type: <code>attribute set of list of string</code></div>
|
||||||
|
<div class="option-description"><html><head></head><body><p>For each parser, registers a list of alternative filetypes.
|
||||||
|
For more information see <code>:h vim.treesitter.language.register()</code>.
|
||||||
|
See treesitter builtin mappings here: <<a href="https://github.com/nvim-treesitter/nvim-treesitter/blob/main/plugin/filetypes.lua">https://github.com/nvim-treesitter/nvim-treesitter/blob/main/plugin/filetypes.lua</a>></p>
|
||||||
|
</body></html></div>
|
||||||
|
<div class="option-default">Default: <code>{ }</code></div>
|
||||||
|
<div class="option-example">Example: <pre><code>{
|
||||||
|
sh = [
|
||||||
|
"ash"
|
||||||
|
"dash"
|
||||||
|
];
|
||||||
|
}</code></pre></div>
|
||||||
|
<div class="option-declared">Declared in: <code><a href="https://github.com/NotAShelf/nvf/blob/main/modules/plugins/treesitter/treesitter.nix" target="_blank"><nvf/modules/plugins/treesitter/treesitter.nix></a></code></div>
|
||||||
|
</div>
|
||||||
<div class="option" id="option-vim.treesitter.fold">
|
<div class="option" id="option-vim.treesitter.fold">
|
||||||
<h3 class="option-name">
|
<h3 class="option-name">
|
||||||
<a href="#option-vim.treesitter.fold" class="option-anchor">vim.treesitter.fold</a>
|
<a href="#option-vim.treesitter.fold" class="option-anchor">vim.treesitter.fold</a>
|
||||||
|
|
@ -44591,17 +44639,6 @@ the required grammars to this.</p>
|
||||||
<div class="option-default">Default: <code>[ ]</code></div>
|
<div class="option-default">Default: <code>[ ]</code></div>
|
||||||
<div class="option-declared">Declared in: <code><a href="https://github.com/NotAShelf/nvf/blob/main/modules/plugins/treesitter/treesitter.nix" target="_blank"><nvf/modules/plugins/treesitter/treesitter.nix></a></code></div>
|
<div class="option-declared">Declared in: <code><a href="https://github.com/NotAShelf/nvf/blob/main/modules/plugins/treesitter/treesitter.nix" target="_blank"><nvf/modules/plugins/treesitter/treesitter.nix></a></code></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="option" id="option-vim.treesitter.queries._.content">
|
|
||||||
<h3 class="option-name">
|
|
||||||
<a href="#option-vim.treesitter.queries._.content" class="option-anchor">vim.treesitter.queries.*.content</a>
|
|
||||||
<span class="copy-link" title="Copy link to this option"></span>
|
|
||||||
<span class="copy-feedback">Link copied!</span>
|
|
||||||
</h3>
|
|
||||||
<div class="option-type">Type: <code>strings concatenated with "\n"</code></div>
|
|
||||||
<div class="option-description"><html><head></head><body><p>The queries scm script.</p>
|
|
||||||
</body></html></div>
|
|
||||||
<div class="option-declared">Declared in: <code><a href="https://github.com/NotAShelf/nvf/blob/main/modules/plugins/treesitter/treesitter.nix" target="_blank"><nvf/modules/plugins/treesitter/treesitter.nix></a></code></div>
|
|
||||||
</div>
|
|
||||||
<div class="option" id="option-vim.treesitter.queries._.filetypes">
|
<div class="option" id="option-vim.treesitter.queries._.filetypes">
|
||||||
<h3 class="option-name">
|
<h3 class="option-name">
|
||||||
<a href="#option-vim.treesitter.queries._.filetypes" class="option-anchor">vim.treesitter.queries.*.filetypes</a>
|
<a href="#option-vim.treesitter.queries._.filetypes" class="option-anchor">vim.treesitter.queries.*.filetypes</a>
|
||||||
|
|
@ -44614,6 +44651,17 @@ the required grammars to this.</p>
|
||||||
<div class="option-default">Default: <code>[ ]</code></div>
|
<div class="option-default">Default: <code>[ ]</code></div>
|
||||||
<div class="option-declared">Declared in: <code><a href="https://github.com/NotAShelf/nvf/blob/main/modules/plugins/treesitter/treesitter.nix" target="_blank"><nvf/modules/plugins/treesitter/treesitter.nix></a></code></div>
|
<div class="option-declared">Declared in: <code><a href="https://github.com/NotAShelf/nvf/blob/main/modules/plugins/treesitter/treesitter.nix" target="_blank"><nvf/modules/plugins/treesitter/treesitter.nix></a></code></div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="option" id="option-vim.treesitter.queries._.query">
|
||||||
|
<h3 class="option-name">
|
||||||
|
<a href="#option-vim.treesitter.queries._.query" class="option-anchor">vim.treesitter.queries.*.query</a>
|
||||||
|
<span class="copy-link" title="Copy link to this option"></span>
|
||||||
|
<span class="copy-feedback">Link copied!</span>
|
||||||
|
</h3>
|
||||||
|
<div class="option-type">Type: <code>strings concatenated with "\n"</code></div>
|
||||||
|
<div class="option-description"><html><head></head><body><p>The queries scm script.</p>
|
||||||
|
</body></html></div>
|
||||||
|
<div class="option-declared">Declared in: <code><a href="https://github.com/NotAShelf/nvf/blob/main/modules/plugins/treesitter/treesitter.nix" target="_blank"><nvf/modules/plugins/treesitter/treesitter.nix></a></code></div>
|
||||||
|
</div>
|
||||||
<div class="option" id="option-vim.treesitter.queries._.type">
|
<div class="option" id="option-vim.treesitter.queries._.type">
|
||||||
<h3 class="option-name">
|
<h3 class="option-name">
|
||||||
<a href="#option-vim.treesitter.queries._.type" class="option-anchor">vim.treesitter.queries.*.type</a>
|
<a href="#option-vim.treesitter.queries._.type" class="option-anchor">vim.treesitter.queries.*.type</a>
|
||||||
|
|
|
||||||
|
|
@ -468,14 +468,31 @@ formatter.</p>
|
||||||
<p>Added <a class="option-reference" href="options.html#option-vim.treesitter.queries"><code class="nixos-option">vim.treesitter.queries</code></a> to support adding custom queries.</p>
|
<p>Added <a class="option-reference" href="options.html#option-vim.treesitter.queries"><code class="nixos-option">vim.treesitter.queries</code></a> to support adding custom queries.</p>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<p>Added injections for <code>vim.treesitter.queries.*.content</code> as <code>query</code> and
|
<p>Added injections for <code>query = '' ... ''</code> as <code>query</code> and <code>mkLualine '' ... ''</code>,
|
||||||
<code>mkLualine</code>, <code>entryAnywhere</code>, <code>entryBefore</code>, <code>entryAfter</code> as <code>lua</code> in nix.</p>
|
<code>entryAnywhere '' ... ''</code>, <code>entryBefore ] '' ... ''</code>,
|
||||||
|
<code>entryAfter ] '' ... ''</code> as <code>lua</code> in nix.</p>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<p>Added <a class="option-reference" href="options.html#option-vim.languages.tera.treesitter.injection"><code class="nixos-option">vim.languages.tera.treesitter.injection</code></a> to configure, what
|
<p>Added <a class="option-reference" href="options.html#option-vim.languages.tera.treesitter.injection"><code class="nixos-option">vim.languages.tera.treesitter.injection</code></a> to configure, what
|
||||||
language the content is.</p>
|
language the content is.</p>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
|
<p>Added <a class="option-reference" href="options.html#option-vim.languages.jinja.treesitter.injection"><code class="nixos-option">vim.languages.jinja.treesitter.injection</code></a> to configure, what
|
||||||
|
language the content is.</p>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<p>Added <a class="option-reference" href="options.html#option-vim.treesitter.filetypeMappings"><code class="nixos-option">vim.treesitter.filetypeMappings</code></a> to support mappings similar to
|
||||||
|
<a href="https://github.com/nvim-treesitter/nvim-treesitter/blob/main/plugin/filetypes.lua">https://github.com/nvim-treesitter/nvim-treesitter/blob/main/plugin/filetypes.lua</a>.
|
||||||
|
This is mostly use full for Markdown code block injections.</p>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<p>Added some Tree-sitter filetype mappings for:</p>
|
||||||
|
<ul>
|
||||||
|
<li><code>bash</code> = <code>ash</code>, <code>dash</code>, <code>zsh</code></li>
|
||||||
|
<li><code>yaml</code> = <code>yaml</code></li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
<p>Added <code>vim.lsp.presets.<name></code> to contain LSP configurations. This allows for
|
<p>Added <code>vim.lsp.presets.<name></code> to contain LSP configurations. This allows for
|
||||||
more flexibility in nvf and reuse of LSPs across languages. Dropped
|
more flexibility in nvf and reuse of LSPs across languages. Dropped
|
||||||
<code>deprecatedSingleOrListOf</code> in favor of <code>listOf</code> for the affected LSP options.</p>
|
<code>deprecatedSingleOrListOf</code> in favor of <code>listOf</code> for the affected LSP options.</p>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue