feat: improve nvim experience

nixos
Moritz Böhme 2024-06-17 10:02:10 +02:00
parent c11a2c5596
commit fcfc548717
Signed by: moritz
GPG Key ID: 970C6E89EB0547A9
3 changed files with 14 additions and 12 deletions

View File

@ -37,8 +37,6 @@
smartcolumn-nvim.url = "github:m4xshen/smartcolumn.nvim";
telekasten-nvim.flake = false;
telekasten-nvim.url = "github:renerocksai/telekasten.nvim";
none-ls-nvim.flake = false;
none-ls-nvim.url = "github:nvimtools/none-ls.nvim";
neotest-python.flake = false;
neotest-python.url = "github:MoritzBoehme/neotest-python/fix-runtimepath-search";
statuscol-nvim.flake = false;
@ -47,6 +45,8 @@
gen-nvim.url = "github:David-Kunz/gen.nvim";
hawtkeys-nvim.flake = false;
hawtkeys-nvim.url = "github:tris203/hawtkeys.nvim";
none-ls-shellcheck-nvim.flake = false;
none-ls-shellcheck-nvim.url = "github:gbprod/none-ls-shellcheck.nvim";
# river
river.url = "git+https://github.com/riverwm/river?submodules=1";

View File

@ -3,14 +3,14 @@ local null_ls = require("null-ls")
null_ls.setup({
sources = {
-- Code actions
null_ls.builtins.code_actions.shellcheck,
require("none-ls-shellcheck.code_actions"),
null_ls.builtins.code_actions.statix,
-- Diagnostics
null_ls.builtins.diagnostics.checkmake,
null_ls.builtins.diagnostics.deadnix,
null_ls.builtins.diagnostics.dotenv_linter,
null_ls.builtins.diagnostics.fish,
null_ls.builtins.diagnostics.shellcheck,
require("none-ls-shellcheck.diagnostics"),
null_ls.builtins.diagnostics.statix,
null_ls.builtins.diagnostics.trail_space,
null_ls.builtins.diagnostics.yamllint,

View File

@ -8,6 +8,9 @@ cmp.setup({
mode = "symbol", -- show only symbol annotations
maxwidth = 50, -- prevent the popup from showing more than provided characters
ellipsis_char = "...", -- when popup menu exceed maxwidth, the truncated part would show ellipsis_char instead
symbol_map = {
Copilot = "",
},
}),
},
enabled = function()
@ -59,14 +62,13 @@ cmp.setup({
end, { "i", "s" }),
}),
sources = cmp.config.sources({
{ name = "async_path", priority = 1 },
{ name = "nvim_lsp", priority = 2 },
{ name = "nvim_lsp_signature_help", priority = 3 },
{ name = "luasnip", priority = 4 },
}, {
{ name = "async_path" },
{ name = "buffer" },
{ name = "spell" },
{ priority = 1, name = "async_path" },
{ priority = 1, name = "buffer" },
{ priority = 1, name = "spell" },
{ priority = 2, name = "nvim_lsp" },
{ priority = 3, name = "copilot" },
{ priority = 3, name = "nvim_lsp_signature_help" },
{ priority = 4, name = "luasnip" },
}),
})