mirror of
https://github.com/NotAShelf/nvf.git
synced 2026-04-13 05:43:50 +00:00
Merge pull request #1512 from snoweuph/main
Some checks failed
Set up binary cache / cachix (default) (push) Has been cancelled
Set up binary cache / cachix (maximal) (push) Has been cancelled
Set up binary cache / cachix (nix) (push) Has been cancelled
Treewide Checks / Validate flake (push) Has been cancelled
Treewide Checks / Check formatting (push) Has been cancelled
Treewide Checks / Check source tree for typos (push) Has been cancelled
Treewide Checks / Validate documentation builds (push) Has been cancelled
Treewide Checks / Validate documentation builds-1 (push) Has been cancelled
Treewide Checks / Validate documentation builds-2 (push) Has been cancelled
Treewide Checks / Validate documentation builds-3 (push) Has been cancelled
Treewide Checks / Validate hyperlinks in documentation sources (push) Has been cancelled
Treewide Checks / Validate Editorconfig conformance (push) Has been cancelled
Build and deploy documentation / Check latest commit (push) Has been cancelled
Build and deploy documentation / publish (push) Has been cancelled
Some checks failed
Set up binary cache / cachix (default) (push) Has been cancelled
Set up binary cache / cachix (maximal) (push) Has been cancelled
Set up binary cache / cachix (nix) (push) Has been cancelled
Treewide Checks / Validate flake (push) Has been cancelled
Treewide Checks / Check formatting (push) Has been cancelled
Treewide Checks / Check source tree for typos (push) Has been cancelled
Treewide Checks / Validate documentation builds (push) Has been cancelled
Treewide Checks / Validate documentation builds-1 (push) Has been cancelled
Treewide Checks / Validate documentation builds-2 (push) Has been cancelled
Treewide Checks / Validate documentation builds-3 (push) Has been cancelled
Treewide Checks / Validate hyperlinks in documentation sources (push) Has been cancelled
Treewide Checks / Validate Editorconfig conformance (push) Has been cancelled
Build and deploy documentation / Check latest commit (push) Has been cancelled
Build and deploy documentation / publish (push) Has been cancelled
Fix Treesitter, to actually allow nulling grammars, and reapply corrected ASM patches
This commit is contained in:
commit
5ab359ee7d
3 changed files with 16 additions and 5 deletions
|
|
@ -229,6 +229,9 @@
|
|||
|
||||
[Snoweuph](https://github.com/snoweuph)
|
||||
|
||||
- Fix `tressiter` to allow `null` in grammar options, so they can be filtered
|
||||
out.
|
||||
|
||||
- Added [Selenen](https://github.com/kampfkarren/selene) for more diagnostics in
|
||||
`languages.lua`.
|
||||
|
||||
|
|
@ -304,6 +307,8 @@
|
|||
|
||||
- Added `languages.jq`. Supports highlighting, formatting and lsp.
|
||||
|
||||
- Extend `languages.asm` to support more filetypes out of the box.
|
||||
|
||||
- Didn't Add
|
||||
[`syntax-gaslighting`](https://github.com/NotAShelf/syntax-gaslighting.nvim),
|
||||
you're crazy.
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
asm-lsp = {
|
||||
enable = true;
|
||||
cmd = [(getExe pkgs.asm-lsp)];
|
||||
filetypes = ["asm" "vmasm"];
|
||||
filetypes = ["asm" "nasm" "masm" "vmasm" "fasm" "tasm" "tiasm" "asm68k" "asm8300"];
|
||||
root_markers = [".asm-lsp.toml" ".git"];
|
||||
};
|
||||
};
|
||||
|
|
@ -33,7 +33,9 @@ in {
|
|||
default = config.vim.languages.enableTreesitter;
|
||||
defaultText = literalExpression "config.vim.languages.enableTreesitter";
|
||||
};
|
||||
package = mkGrammarOption pkgs "asm";
|
||||
packageASM = mkGrammarOption pkgs "asm";
|
||||
packageNASM = mkGrammarOption pkgs "nasm";
|
||||
packageRpiPicoASM = mkGrammarOption pkgs "pioasm";
|
||||
};
|
||||
|
||||
lsp = {
|
||||
|
|
@ -53,7 +55,11 @@ in {
|
|||
config = mkIf cfg.enable (mkMerge [
|
||||
(mkIf cfg.treesitter.enable {
|
||||
vim.treesitter.enable = true;
|
||||
vim.treesitter.grammars = [cfg.treesitter.package];
|
||||
vim.treesitter.grammars = [
|
||||
cfg.treesitter.packageASM
|
||||
cfg.treesitter.packageNASM
|
||||
cfg.treesitter.packageRpiPicoASM
|
||||
];
|
||||
})
|
||||
|
||||
(mkIf cfg.lsp.enable {
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
...
|
||||
}: let
|
||||
inherit (lib.options) mkOption mkEnableOption literalExpression;
|
||||
inherit (lib.types) listOf package bool;
|
||||
inherit (lib.types) listOf nullOr package bool;
|
||||
in {
|
||||
options.vim.treesitter = {
|
||||
enable = mkEnableOption "treesitter, also enabled automatically through language options";
|
||||
|
|
@ -13,7 +13,7 @@ in {
|
|||
autotagHtml = mkEnableOption "autoclose and rename html tag";
|
||||
|
||||
grammars = mkOption {
|
||||
type = listOf package;
|
||||
type = listOf (nullOr package);
|
||||
default = [];
|
||||
example = literalExpression ''
|
||||
with pkgs.vimPlugins.nvim-treesitter.grammarPlugins; [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue