From 499ef17535a776c08e09e025eb3de6882288d4b4 Mon Sep 17 00:00:00 2001 From: Soispha Date: Sun, 10 Mar 2024 17:07:47 +0100 Subject: refactor(hm/conf/nvim/plgs/{nvim-cmp,vim-tex}): Update to new attr names --- hm/soispha/conf/nvim/plgs/nvim-cmp/default.nix | 53 +++++++++++--------------- hm/soispha/conf/nvim/plgs/vim-tex/default.nix | 2 +- 2 files changed, 24 insertions(+), 31 deletions(-) (limited to 'hm/soispha/conf/nvim') diff --git a/hm/soispha/conf/nvim/plgs/nvim-cmp/default.nix b/hm/soispha/conf/nvim/plgs/nvim-cmp/default.nix index f78b00b3..ed0e57c3 100644 --- a/hm/soispha/conf/nvim/plgs/nvim-cmp/default.nix +++ b/hm/soispha/conf/nvim/plgs/nvim-cmp/default.nix @@ -1,5 +1,5 @@ {config, ...}: { - programs.nixvim.plugins.nvim-cmp = let + programs.nixvim.plugins.cmp = let neorg_source = if config.programs.nixvim.plugins.neorg.modules."core.completion".config.engine == "nvim-cmp" then [{name = "neorg";}] @@ -25,37 +25,30 @@ ``` */ enable = true; - - mapping = { - # TODO: add support for desc and which key here - "" = { - action = "cmp.mapping.scroll_docs(-4)"; - #desc = "Scroll up by four lines"; - }; - "" = { - action = "cmp.mapping.scroll_docs(4)"; - #desc = "Scroll down by four lines"; - }; - "HH" = { - action = "cmp.mapping.complete()"; - #desc = "Confirm snipped"; + autoEnableSources = true; + settings = { + mapping = { + # TODO: add support for desc and which key here + "" = "cmp.mapping.scroll_docs(-4)"; # desc = "Scroll up by four lines" + "" = "cmp.mapping.scroll_docs(4)"; # desc = "Scroll down by four lines" + "HH" = "cmp.mapping.complete()"; # desc = "Confirm snipped" }; - }; - snippet.expand = "luasnip"; + snippet.expand = "function(args) require('luasnip').lsp_expand(args.body) end"; - sources = - [ - {name = "nvim_lsp";} - {name = "luasnip";} - {name = "path";} - {name = "git";} # TODO: I might want to add config to allow all issues/prs <2023-10-16> - # {name = "convertionalcommits";} # TODO: Useless without commitlint [https://commitlint.js.org/] <2023-10-16> - # {name = "rg";} # TODO: This might really RIP-grep my system <2023-10-16> - # {name = "buffer";} - # {name = "digraphs";} - {name = "calc";} - ] - ++ neorg_source; + sources = + [ + {name = "nvim_lsp";} + {name = "luasnip";} + {name = "path";} + {name = "git";} # TODO: I might want to add config to allow all issues/prs <2023-10-16> + # {name = "convertionalcommits";} # TODO: Useless without commitlint [https://commitlint.js.org/] <2023-10-16> + # {name = "rg";} # TODO: This might really RIP-grep my system <2023-10-16> + # {name = "buffer";} + # {name = "digraphs";} + {name = "calc";} + ] + ++ neorg_source; + }; }; } diff --git a/hm/soispha/conf/nvim/plgs/vim-tex/default.nix b/hm/soispha/conf/nvim/plgs/vim-tex/default.nix index 2fae2106..dccc0911 100644 --- a/hm/soispha/conf/nvim/plgs/vim-tex/default.nix +++ b/hm/soispha/conf/nvim/plgs/vim-tex/default.nix @@ -4,7 +4,7 @@ plugins.vimtex = { enable = true; - extraConfig = { + settings = { view_method = "zathura"; quickfix_mode = -1; view_enabled = -1; -- cgit 1.4.1