Compare commits

..

5 commits

11 changed files with 39 additions and 156 deletions

View file

@ -46,8 +46,6 @@ isMaximal: {
nix.enable = true; nix.enable = true;
# Assembly is not common, and the asm LSP is a major hit-or-miss
assembly.enable = false;
markdown.enable = isMaximal; markdown.enable = isMaximal;
html.enable = isMaximal; html.enable = isMaximal;
css.enable = isMaximal; css.enable = isMaximal;

View file

@ -285,9 +285,6 @@ To migrate to `nixfmt`, simply change `vim.languages.nix.format.type` to
- Add [](#opt-vim.spellcheck.extraSpellWords) to allow adding arbitrary - Add [](#opt-vim.spellcheck.extraSpellWords) to allow adding arbitrary
spellfiles to Neovim's runtime with ease. spellfiles to Neovim's runtime with ease.
- Add combined nvf configuration (`config.vim`) into the final package's
passthru as `passthru.neovimConfiguration` for easier debugging.
[ppenguin](https://github.com/ppenguin): [ppenguin](https://github.com/ppenguin):
- Telescope: - Telescope:
@ -305,9 +302,6 @@ To migrate to `nixfmt`, simply change `vim.languages.nix.format.type` to
`vim.languages.kotlin` `vim.languages.kotlin`
- changed default keybinds for leap.nvim to avoid altering expected behavior - changed default keybinds for leap.nvim to avoid altering expected behavior
- Add LSP, formatter and Treesitter support for Vala under `vim.languages.vala` - Add LSP, formatter and Treesitter support for Vala under `vim.languages.vala`
- Add [Tinymist](https://github.com/Myriad-Dreamin/tinymist] as a formatter for
the Typst language module.
- Add LSP and Treesitter support for Assembly under `vim.languages.assembly`
[Bloxx12](https://github.com/Bloxx12) [Bloxx12](https://github.com/Bloxx12)
@ -332,3 +326,4 @@ To migrate to `nixfmt`, simply change `vim.languages.nix.format.type` to
[Nowaaru](https://github.com/Nowaaru): [Nowaaru](https://github.com/Nowaaru):
- Add `precognition-nvim`. - Add `precognition-nvim`.

View file

@ -38,11 +38,11 @@
}, },
"mnw": { "mnw": {
"locked": { "locked": {
"lastModified": 1731182209, "lastModified": 1728258832,
"narHash": "sha256-yftvwv8bHEKjmSKREdkGLWTDhf7vA2Ssvl/XMpykigg=", "narHash": "sha256-RtrtcogcvjImxBMe/TRNoHT+6w4Omf64IhzI0/y6Zxk=",
"owner": "Gerg-L", "owner": "Gerg-L",
"repo": "mnw", "repo": "mnw",
"rev": "0a5e50286ca9f1b70eb4fa29ce84304cad657700", "rev": "00ccbc83e83694b07005e8f9273ca8557e5f20ae",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -207,11 +207,11 @@
"plugin-catppuccin": { "plugin-catppuccin": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1731169755, "lastModified": 1730606011,
"narHash": "sha256-lsnePejThsEygTCKV/rfJJ/h+RSrro91am841iznJe4=", "narHash": "sha256-efz7etLeDHflBBxsA1HdFsM4/cMD+psmanc2mxUKKtM=",
"owner": "catppuccin", "owner": "catppuccin",
"repo": "nvim", "repo": "nvim",
"rev": "637d99e638bc6f1efedac582f6ccab08badac0c6", "rev": "35d8057137af463c9f41f169539e9b190d57d269",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -1072,11 +1072,11 @@
"plugin-noice-nvim": { "plugin-noice-nvim": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1731163840, "lastModified": 1731022276,
"narHash": "sha256-zT+fJ88V/LfmibXs4QpIyxCu1HHSjbqsrcQK/vadeRA=", "narHash": "sha256-Rn8vNqVlDrhfcyVn/B8rY7ABlMgmbE4L8J6g0oV5Ywg=",
"owner": "folke", "owner": "folke",
"repo": "noice.nvim", "repo": "noice.nvim",
"rev": "2087bbf8cd64482b47fb5f33b5e0eabf329ab14b", "rev": "4d48c360a19b3920a4041868530fd4b99919fa0c",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -1441,11 +1441,11 @@
"plugin-nvim-tree-lua": { "plugin-nvim-tree-lua": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1731123986, "lastModified": 1730603172,
"narHash": "sha256-zt04Q3Mr1k9x6X6l3F9iy3C1edQYha4pQhDsOX5atPM=", "narHash": "sha256-kwzsjwQ68yluytbVBkSqaVZKo1eaV8W1fUcmgcDJMIU=",
"owner": "nvim-tree", "owner": "nvim-tree",
"repo": "nvim-tree.lua", "repo": "nvim-tree.lua",
"rev": "c7639482a1598f4756798df1b2d72f79fe5bb34f", "rev": "610a1c189bdb2b9b936169b2ea9d1838f971fa2b",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -1457,11 +1457,11 @@
"plugin-nvim-treesitter-context": { "plugin-nvim-treesitter-context": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1731163983, "lastModified": 1730295979,
"narHash": "sha256-oRmhwRIynCNmgKpTtwUIliYf0Qo+zP3ymEWYs+vzx8A=", "narHash": "sha256-LKt1LkTfN3WTmychWoy4Hhil8CWn2LjPd+VV0aHNbrc=",
"owner": "nvim-treesitter", "owner": "nvim-treesitter",
"repo": "nvim-treesitter-context", "repo": "nvim-treesitter-context",
"rev": "158377d700596367a91ea41818f76abdbf75a232", "rev": "a2a334900d3643de585ac5c6140b03403454124f",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -1537,11 +1537,11 @@
"plugin-onedark": { "plugin-onedark": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1731171496, "lastModified": 1720202427,
"narHash": "sha256-NLHq9SUUo81m50NPQe8852uZbo4Mo4No10N3ptX43t0=", "narHash": "sha256-TAVN4wa45a6ndugkvjb3ev5sBHsZCd5RbXWgW+3ds9A=",
"owner": "navarasu", "owner": "navarasu",
"repo": "onedark.nvim", "repo": "onedark.nvim",
"rev": "67a74c275d1116d575ab25485d1bfa6b2a9c38a6", "rev": "fae34f7c635797f4bf62fb00e7d0516efa8abe37",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -1713,11 +1713,11 @@
"plugin-rustaceanvim": { "plugin-rustaceanvim": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1731172933, "lastModified": 1731003427,
"narHash": "sha256-B2AdSgGPANCBbVN+Sd7gvJ16ODZZwv4WSOxnRs3SWnk=", "narHash": "sha256-Sobs/ybL7VPsyh2c0EED0U5kl/tGtFcaj76k9DYLuhw=",
"owner": "mrcjkb", "owner": "mrcjkb",
"repo": "rustaceanvim", "repo": "rustaceanvim",
"rev": "244443311f1c4e34ec1ea7f219a4b682b6ec066e", "rev": "1c174224784973d782767197d73aecd9a0825753",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -1809,11 +1809,11 @@
"plugin-toggleterm-nvim": { "plugin-toggleterm-nvim": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1731162901, "lastModified": 1730458171,
"narHash": "sha256-g1FwgCc3a8Fak0Nb0gQQ+SI44uyAGaH1tIk1qpaAPEY=", "narHash": "sha256-97yqt1H8fusscubDw6JA2ylBqAjPHyqvYHr2xFbRmyE=",
"owner": "akinsho", "owner": "akinsho",
"repo": "toggleterm.nvim", "repo": "toggleterm.nvim",
"rev": "87b2d6a3cab8e2bd9a0255427074285f0365398d", "rev": "5969229c0352ff1ed7f6e24aba9c6554e1842939",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -123,11 +123,6 @@ in {
paths = [neovim-wrapped printConfig printConfigPath]; paths = [neovim-wrapped printConfig printConfigPath];
postBuild = "echo Helpers added"; postBuild = "echo Helpers added";
# Allow evaluating vimOptions, i.e., config.vim from the packages' passthru
# attribute. For example, packages.x86_64-linux.neovim.passthru.neovimConfig
# will return the configuration in full.
passthru.neovimConfig = vimOptions;
meta = { meta = {
description = "Wrapped version of Neovim with additional helper scripts"; description = "Wrapped version of Neovim with additional helper scripts";
mainProgram = "nvim"; mainProgram = "nvim";

View file

@ -42,20 +42,6 @@ in {
after = '' after = ''
${optionalString luasnipEnable "local luasnip = require('luasnip')"} ${optionalString luasnipEnable "local luasnip = require('luasnip')"}
local cmp = require("cmp") local cmp = require("cmp")
local kinds = require("cmp.types").lsp.CompletionItemKind
local deprio = function(kind)
return function(e1, e2)
if e1:get_kind() == kind then
return false
end
if e2:get_kind() == kind then
return true
end
return nil
end
end
cmp.setup(${toLuaObject cfg.setupOpts}) cmp.setup(${toLuaObject cfg.setupOpts})
${optionalString config.vim.lazy.enable ${optionalString config.vim.lazy.enable

View file

@ -29,8 +29,6 @@ in {
sorting.comparators = mkOption { sorting.comparators = mkOption {
type = mergelessListOf (either str luaInline); type = mergelessListOf (either str luaInline);
default = [ default = [
(mkLuaInline "deprio(kinds.Text)")
(mkLuaInline "deprio(kinds.Snippet)")
"offset" "offset"
"exact" "exact"
"score" "score"
@ -45,12 +43,6 @@ in {
(see `:help cmp-config.sorting.comparators`), (see `:help cmp-config.sorting.comparators`),
or a string, in which case the builtin comparator with that name will or a string, in which case the builtin comparator with that name will
be used. be used.
A `deprio` function and a `kinds`
(`require("cmp.types").lsp.CompletionItemKind`) variable is provided
above `setupOpts`. By passing a type to the funcion, the returned
function will be a comparator that always ranks the specified kind the
lowest.
''; '';
apply = map ( apply = map (
c: c:

View file

@ -1,49 +0,0 @@
{
config,
pkgs,
lib,
...
}: let
inherit (lib.options) mkEnableOption mkOption;
inherit (lib.modules) mkIf mkMerge;
inherit (lib.types) package;
inherit (lib.nvim.types) mkGrammarOption;
cfg = config.vim.languages.assembly;
in {
options.vim.languages.assembly = {
enable = mkEnableOption "Assembly support";
treesitter = {
enable = mkEnableOption "Assembly treesitter" // {default = config.vim.languages.enableTreesitter;};
package = mkGrammarOption pkgs "asm";
};
lsp = {
enable = mkEnableOption "Assembly LSP support (asm-lsp)" // {default = config.vim.languages.enableLSP;};
package = mkOption {
type = package;
default = pkgs.asm-lsp;
description = "asm-lsp package";
};
};
};
config = mkIf cfg.enable (mkMerge [
(mkIf cfg.treesitter.enable {
vim.treesitter.enable = true;
vim.treesitter.grammars = [cfg.treesitter.package];
})
(mkIf cfg.lsp.enable {
vim.lsp.lspconfig.enable = true;
vim.lsp.lspconfig.sources.asm-lsp = ''
lspconfig.asm_lsp.setup {
capabilities = capabilities,
on_attach = default_on_attach,
cmd = {"${cfg.lsp.package}/bin/asm-lsp"},
}
'';
})
]);
}

View file

@ -2,7 +2,6 @@
inherit (lib.nvim.languages) mkEnable; inherit (lib.nvim.languages) mkEnable;
in { in {
imports = [ imports = [
./asm.nix
./bash.nix ./bash.nix
./dart.nix ./dart.nix
./clang.nix ./clang.nix

View file

@ -14,38 +14,6 @@
cfg = config.vim.languages.typst; cfg = config.vim.languages.typst;
defaultServer = "tinymist";
servers = {
typst-lsp = {
package = pkgs.typst-lsp;
lspConfig = ''
lspconfig.typst_lsp.setup {
capabilities = capabilities,
on_attach = default_on_attach,
cmd = ${
if isList cfg.lsp.package
then expToLua cfg.lsp.package
else ''{"${cfg.lsp.package}/bin/typst-lsp"}''
},
}
'';
};
tinymist = {
package = pkgs.tinymist;
lspConfig = ''
lspconfig.tinymist.setup {
capabilities = capabilities,
on_attach = default_on_attach,
cmd = ${
if isList cfg.lsp.package
then expToLua cfg.lsp.package
else ''{"${cfg.lsp.package}/bin/tinymist"}''
},
}
'';
};
};
defaultFormat = "typstfmt"; defaultFormat = "typstfmt";
formats = { formats = {
typstfmt = { typstfmt = {
@ -84,17 +52,11 @@ in {
lsp = { lsp = {
enable = mkEnableOption "Typst LSP support (typst-lsp)" // {default = config.vim.languages.enableLSP;}; enable = mkEnableOption "Typst LSP support (typst-lsp)" // {default = config.vim.languages.enableLSP;};
server = mkOption {
description = "Typst LSP server to use";
type = enum (attrNames servers);
default = defaultServer;
};
package = mkOption { package = mkOption {
description = "typst-lsp package, or the command to run as a list of strings"; description = "typst-lsp package, or the command to run as a list of strings";
example = ''[lib.getExe pkgs.jdt-language-server "-data" "~/.cache/jdtls/workspace"]''; example = ''[lib.getExe pkgs.jdt-language-server "-data" "~/.cache/jdtls/workspace"]'';
type = either package (listOf str); type = either package (listOf str);
default = servers.${cfg.lsp.server}.package; default = pkgs.typst-lsp;
}; };
}; };
@ -120,14 +82,19 @@ in {
vim.treesitter.grammars = [cfg.treesitter.package]; vim.treesitter.grammars = [cfg.treesitter.package];
}) })
(mkIf cfg.format.enable {
vim.lsp.null-ls.enable = true;
vim.lsp.null-ls.sources.typst-format = formats.${cfg.format.type}.nullConfig;
})
(mkIf cfg.lsp.enable { (mkIf cfg.lsp.enable {
vim.lsp.lspconfig.enable = true; vim.lsp.lspconfig.enable = true;
vim.lsp.lspconfig.sources.typst-lsp = servers.${cfg.lsp.server}.lspConfig; vim.lsp.lspconfig.sources.typst-lsp = ''
lspconfig.typst_lsp.setup {
capabilities = capabilities,
on_attach=default_on_attach,
cmd = ${
if isList cfg.lsp.package
then expToLua cfg.lsp.package
else ''{"${cfg.lsp.package}/bin/typst-lsp"}''
},
}
'';
}) })
]); ]);
} }

View file

@ -16,7 +16,7 @@ in {
enable = mkEnableOption "Neovim dev icons [nvim-web-devicons]"; enable = mkEnableOption "Neovim dev icons [nvim-web-devicons]";
setupOpts = mkPluginSetupOption "nvim-web-devicons" { setupOpts = mkPluginSetupOption "nvim-web-devicons" {
color_icons = mkEnableOption "different highlight colors per icon" // {default = true;}; color_icons = mkEnableOption "different highlight colors per icon";
variant = mkOption { variant = mkOption {
type = nullOr (enum ["light" "dark"]); type = nullOr (enum ["light" "dark"]);
default = null; default = null;

View file

@ -189,7 +189,7 @@ in {
}; };
plugins = mkOption { plugins = mkOption {
default = {}; default = [];
type = attrsOf lznPluginType; type = attrsOf lznPluginType;
description = '' description = ''
Plugins to lazy load. Plugins to lazy load.