mirror of
https://github.com/fred-drake/neovim.git
synced 2026-06-05 14:59:28 -05:00
Improved completion look and feel
This commit is contained in:
+13
-22
@@ -1,5 +1,9 @@
|
|||||||
let
|
let
|
||||||
selectOpts = "{behavior = cmp.SelectBehavior.Select}";
|
selectOpts = ''
|
||||||
|
{
|
||||||
|
behavior = cmp.SelectBehavior.Insert
|
||||||
|
}
|
||||||
|
'';
|
||||||
in
|
in
|
||||||
{pkgs, ...}: {
|
{pkgs, ...}: {
|
||||||
plugins = {
|
plugins = {
|
||||||
@@ -22,28 +26,17 @@ in
|
|||||||
keywordLength = 3;
|
keywordLength = 3;
|
||||||
}
|
}
|
||||||
{name = "supermaven";}
|
{name = "supermaven";}
|
||||||
|
{name = "luasnip";}
|
||||||
];
|
];
|
||||||
|
|
||||||
snippet.expand = "function(args) require('luasnip').lsp_expand(args.body) end";
|
snippet.expand = "function(args) require('luasnip').lsp_expand(args.body) end";
|
||||||
formatting = {
|
formatting = {
|
||||||
fields = [
|
fields = [
|
||||||
"menu"
|
|
||||||
"abbr"
|
"abbr"
|
||||||
"kind"
|
"kind"
|
||||||
|
"menu"
|
||||||
];
|
];
|
||||||
format = ''
|
# format = lspkindFormat;
|
||||||
function(entry, item)
|
|
||||||
local menu_icon = {
|
|
||||||
nvim_lsp = '[LSP]',
|
|
||||||
luasnip = '[SNIP]',
|
|
||||||
buffer = '[BUF]',
|
|
||||||
path = '[PATH]',
|
|
||||||
}
|
|
||||||
|
|
||||||
item.menu = menu_icon[entry.source.name]
|
|
||||||
return item
|
|
||||||
end
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
|
|
||||||
mapping = {
|
mapping = {
|
||||||
@@ -136,6 +129,9 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
cmp-nvim-lsp.enable = true;
|
cmp-nvim-lsp.enable = true;
|
||||||
|
lspkind.enable = true;
|
||||||
|
lspkind.cmp.enable = true;
|
||||||
|
luasnip.enable = true;
|
||||||
cmp-buffer.enable = true;
|
cmp-buffer.enable = true;
|
||||||
cmp-path.enable = true;
|
cmp-path.enable = true;
|
||||||
cmp-treesitter.enable = true;
|
cmp-treesitter.enable = true;
|
||||||
@@ -148,12 +144,7 @@ in
|
|||||||
just.enable = true;
|
just.enable = true;
|
||||||
opentofu_fmt.enable = true;
|
opentofu_fmt.enable = true;
|
||||||
prettier.enable = true;
|
prettier.enable = true;
|
||||||
# rubyfmt is broken on darwin-based systems
|
rubocop.enable = true;
|
||||||
rubyfmt.enable = (
|
|
||||||
pkgs.stdenv.hostPlatform.system
|
|
||||||
!= "x86_64-darwin"
|
|
||||||
&& pkgs.stdenv.hostPlatform.system != "aarch64-darwin"
|
|
||||||
);
|
|
||||||
sqlformat.enable = true;
|
sqlformat.enable = true;
|
||||||
stylua.enable = true;
|
stylua.enable = true;
|
||||||
yamlfmt.enable = true;
|
yamlfmt.enable = true;
|
||||||
@@ -181,7 +172,7 @@ in
|
|||||||
lua = ["stylua"];
|
lua = ["stylua"];
|
||||||
markdown = ["prettier"];
|
markdown = ["prettier"];
|
||||||
nix = ["alejandra"];
|
nix = ["alejandra"];
|
||||||
ruby = ["rubyfmt"];
|
ruby = ["rubocop"];
|
||||||
terraform = ["tofu_fmt"];
|
terraform = ["tofu_fmt"];
|
||||||
tf = ["tofu_fmt"];
|
tf = ["tofu_fmt"];
|
||||||
yaml = ["yamlfmt"];
|
yaml = ["yamlfmt"];
|
||||||
|
|||||||
Reference in New Issue
Block a user