mirror of
https://github.com/NotAShelf/nvf.git
synced 2024-11-26 15:06:45 +00:00
Compare commits
5 commits
d2286843a6
...
1f7ecd61cb
Author | SHA1 | Date | |
---|---|---|---|
1f7ecd61cb | |||
20743bcee1 | |||
cd75e640ca | |||
6a423fcc43 | |||
91aafda1af |
11 changed files with 39 additions and 156 deletions
|
@ -46,8 +46,6 @@ isMaximal: {
|
|||
|
||||
nix.enable = true;
|
||||
|
||||
# Assembly is not common, and the asm LSP is a major hit-or-miss
|
||||
assembly.enable = false;
|
||||
markdown.enable = isMaximal;
|
||||
html.enable = isMaximal;
|
||||
css.enable = isMaximal;
|
||||
|
|
|
@ -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
|
||||
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):
|
||||
|
||||
- Telescope:
|
||||
|
@ -305,9 +302,6 @@ To migrate to `nixfmt`, simply change `vim.languages.nix.format.type` to
|
|||
`vim.languages.kotlin`
|
||||
- changed default keybinds for leap.nvim to avoid altering expected behavior
|
||||
- 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)
|
||||
|
||||
|
@ -332,3 +326,4 @@ To migrate to `nixfmt`, simply change `vim.languages.nix.format.type` to
|
|||
[Nowaaru](https://github.com/Nowaaru):
|
||||
|
||||
- Add `precognition-nvim`.
|
||||
|
||||
|
|
48
flake.lock
48
flake.lock
|
@ -38,11 +38,11 @@
|
|||
},
|
||||
"mnw": {
|
||||
"locked": {
|
||||
"lastModified": 1731182209,
|
||||
"narHash": "sha256-yftvwv8bHEKjmSKREdkGLWTDhf7vA2Ssvl/XMpykigg=",
|
||||
"lastModified": 1728258832,
|
||||
"narHash": "sha256-RtrtcogcvjImxBMe/TRNoHT+6w4Omf64IhzI0/y6Zxk=",
|
||||
"owner": "Gerg-L",
|
||||
"repo": "mnw",
|
||||
"rev": "0a5e50286ca9f1b70eb4fa29ce84304cad657700",
|
||||
"rev": "00ccbc83e83694b07005e8f9273ca8557e5f20ae",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -207,11 +207,11 @@
|
|||
"plugin-catppuccin": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1731169755,
|
||||
"narHash": "sha256-lsnePejThsEygTCKV/rfJJ/h+RSrro91am841iznJe4=",
|
||||
"lastModified": 1730606011,
|
||||
"narHash": "sha256-efz7etLeDHflBBxsA1HdFsM4/cMD+psmanc2mxUKKtM=",
|
||||
"owner": "catppuccin",
|
||||
"repo": "nvim",
|
||||
"rev": "637d99e638bc6f1efedac582f6ccab08badac0c6",
|
||||
"rev": "35d8057137af463c9f41f169539e9b190d57d269",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -1072,11 +1072,11 @@
|
|||
"plugin-noice-nvim": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1731163840,
|
||||
"narHash": "sha256-zT+fJ88V/LfmibXs4QpIyxCu1HHSjbqsrcQK/vadeRA=",
|
||||
"lastModified": 1731022276,
|
||||
"narHash": "sha256-Rn8vNqVlDrhfcyVn/B8rY7ABlMgmbE4L8J6g0oV5Ywg=",
|
||||
"owner": "folke",
|
||||
"repo": "noice.nvim",
|
||||
"rev": "2087bbf8cd64482b47fb5f33b5e0eabf329ab14b",
|
||||
"rev": "4d48c360a19b3920a4041868530fd4b99919fa0c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -1441,11 +1441,11 @@
|
|||
"plugin-nvim-tree-lua": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1731123986,
|
||||
"narHash": "sha256-zt04Q3Mr1k9x6X6l3F9iy3C1edQYha4pQhDsOX5atPM=",
|
||||
"lastModified": 1730603172,
|
||||
"narHash": "sha256-kwzsjwQ68yluytbVBkSqaVZKo1eaV8W1fUcmgcDJMIU=",
|
||||
"owner": "nvim-tree",
|
||||
"repo": "nvim-tree.lua",
|
||||
"rev": "c7639482a1598f4756798df1b2d72f79fe5bb34f",
|
||||
"rev": "610a1c189bdb2b9b936169b2ea9d1838f971fa2b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -1457,11 +1457,11 @@
|
|||
"plugin-nvim-treesitter-context": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1731163983,
|
||||
"narHash": "sha256-oRmhwRIynCNmgKpTtwUIliYf0Qo+zP3ymEWYs+vzx8A=",
|
||||
"lastModified": 1730295979,
|
||||
"narHash": "sha256-LKt1LkTfN3WTmychWoy4Hhil8CWn2LjPd+VV0aHNbrc=",
|
||||
"owner": "nvim-treesitter",
|
||||
"repo": "nvim-treesitter-context",
|
||||
"rev": "158377d700596367a91ea41818f76abdbf75a232",
|
||||
"rev": "a2a334900d3643de585ac5c6140b03403454124f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -1537,11 +1537,11 @@
|
|||
"plugin-onedark": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1731171496,
|
||||
"narHash": "sha256-NLHq9SUUo81m50NPQe8852uZbo4Mo4No10N3ptX43t0=",
|
||||
"lastModified": 1720202427,
|
||||
"narHash": "sha256-TAVN4wa45a6ndugkvjb3ev5sBHsZCd5RbXWgW+3ds9A=",
|
||||
"owner": "navarasu",
|
||||
"repo": "onedark.nvim",
|
||||
"rev": "67a74c275d1116d575ab25485d1bfa6b2a9c38a6",
|
||||
"rev": "fae34f7c635797f4bf62fb00e7d0516efa8abe37",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -1713,11 +1713,11 @@
|
|||
"plugin-rustaceanvim": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1731172933,
|
||||
"narHash": "sha256-B2AdSgGPANCBbVN+Sd7gvJ16ODZZwv4WSOxnRs3SWnk=",
|
||||
"lastModified": 1731003427,
|
||||
"narHash": "sha256-Sobs/ybL7VPsyh2c0EED0U5kl/tGtFcaj76k9DYLuhw=",
|
||||
"owner": "mrcjkb",
|
||||
"repo": "rustaceanvim",
|
||||
"rev": "244443311f1c4e34ec1ea7f219a4b682b6ec066e",
|
||||
"rev": "1c174224784973d782767197d73aecd9a0825753",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -1809,11 +1809,11 @@
|
|||
"plugin-toggleterm-nvim": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1731162901,
|
||||
"narHash": "sha256-g1FwgCc3a8Fak0Nb0gQQ+SI44uyAGaH1tIk1qpaAPEY=",
|
||||
"lastModified": 1730458171,
|
||||
"narHash": "sha256-97yqt1H8fusscubDw6JA2ylBqAjPHyqvYHr2xFbRmyE=",
|
||||
"owner": "akinsho",
|
||||
"repo": "toggleterm.nvim",
|
||||
"rev": "87b2d6a3cab8e2bd9a0255427074285f0365398d",
|
||||
"rev": "5969229c0352ff1ed7f6e24aba9c6554e1842939",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
|
@ -123,11 +123,6 @@ in {
|
|||
paths = [neovim-wrapped printConfig printConfigPath];
|
||||
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 = {
|
||||
description = "Wrapped version of Neovim with additional helper scripts";
|
||||
mainProgram = "nvim";
|
||||
|
|
|
@ -42,20 +42,6 @@ in {
|
|||
after = ''
|
||||
${optionalString luasnipEnable "local luasnip = require('luasnip')"}
|
||||
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})
|
||||
|
||||
${optionalString config.vim.lazy.enable
|
||||
|
|
|
@ -29,8 +29,6 @@ in {
|
|||
sorting.comparators = mkOption {
|
||||
type = mergelessListOf (either str luaInline);
|
||||
default = [
|
||||
(mkLuaInline "deprio(kinds.Text)")
|
||||
(mkLuaInline "deprio(kinds.Snippet)")
|
||||
"offset"
|
||||
"exact"
|
||||
"score"
|
||||
|
@ -45,12 +43,6 @@ in {
|
|||
(see `:help cmp-config.sorting.comparators`),
|
||||
or a string, in which case the builtin comparator with that name will
|
||||
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 (
|
||||
c:
|
||||
|
|
|
@ -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"},
|
||||
}
|
||||
'';
|
||||
})
|
||||
]);
|
||||
}
|
|
@ -2,7 +2,6 @@
|
|||
inherit (lib.nvim.languages) mkEnable;
|
||||
in {
|
||||
imports = [
|
||||
./asm.nix
|
||||
./bash.nix
|
||||
./dart.nix
|
||||
./clang.nix
|
||||
|
|
|
@ -14,38 +14,6 @@
|
|||
|
||||
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";
|
||||
formats = {
|
||||
typstfmt = {
|
||||
|
@ -84,17 +52,11 @@ in {
|
|||
lsp = {
|
||||
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 {
|
||||
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"]'';
|
||||
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];
|
||||
})
|
||||
|
||||
(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 {
|
||||
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"}''
|
||||
},
|
||||
}
|
||||
'';
|
||||
})
|
||||
]);
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ in {
|
|||
enable = mkEnableOption "Neovim dev icons [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 {
|
||||
type = nullOr (enum ["light" "dark"]);
|
||||
default = null;
|
||||
|
|
|
@ -189,7 +189,7 @@ in {
|
|||
};
|
||||
|
||||
plugins = mkOption {
|
||||
default = {};
|
||||
default = [];
|
||||
type = attrsOf lznPluginType;
|
||||
description = ''
|
||||
Plugins to lazy load.
|
||||
|
|
Loading…
Reference in a new issue