mirror of
https://github.com/oddlama/nix-config.git
synced 2025-10-11 07:10:39 +02:00
chore: fix neovim completion shortcuts, address nix warnings
This commit is contained in:
parent
0349d7fd8b
commit
a0e50ce0e9
6 changed files with 40 additions and 60 deletions
|
@ -36,9 +36,7 @@
|
|||
];
|
||||
mapping = {
|
||||
"<CR>" =
|
||||
/*
|
||||
lua
|
||||
*/
|
||||
# lua
|
||||
''
|
||||
cmp.mapping.confirm({
|
||||
behavior = cmp.ConfirmBehavior.Replace,
|
||||
|
@ -46,24 +44,16 @@
|
|||
})
|
||||
'';
|
||||
"<C-d>" =
|
||||
/*
|
||||
lua
|
||||
*/
|
||||
# lua
|
||||
"cmp.mapping.scroll_docs(-4)";
|
||||
"<C-f>" =
|
||||
/*
|
||||
lua
|
||||
*/
|
||||
# lua
|
||||
"cmp.mapping.scroll_docs(4)";
|
||||
"<C-e>" =
|
||||
/*
|
||||
lua
|
||||
*/
|
||||
# lua
|
||||
"cmp.mapping.abort()";
|
||||
"<Tab>" =
|
||||
/*
|
||||
lua
|
||||
*/
|
||||
# lua
|
||||
''
|
||||
cmp.mapping(function(fallback)
|
||||
local has_words_before = function()
|
||||
|
@ -77,17 +67,21 @@
|
|||
require("luasnip").expand()
|
||||
elseif require("luasnip").expand_or_locally_jumpable() then
|
||||
require("luasnip").expand_or_jump()
|
||||
elseif has_words_before() then
|
||||
cmp.complete()
|
||||
--elseif has_words_before() then
|
||||
-- cmp.complete()
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, {"i", "s"})
|
||||
'';
|
||||
"<Down>" =
|
||||
# lua
|
||||
''cmp.mapping(cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Select }), {'i'})'';
|
||||
"<Up>" =
|
||||
# lua
|
||||
''cmp.mapping(cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Select }), {'i'})'';
|
||||
"<S-Tab>" =
|
||||
/*
|
||||
lua
|
||||
*/
|
||||
# lua
|
||||
''
|
||||
cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
|
@ -102,9 +96,7 @@
|
|||
};
|
||||
formatting.fields = ["abbr" "kind" "menu"];
|
||||
formatting.format =
|
||||
/*
|
||||
lua
|
||||
*/
|
||||
# lua
|
||||
''
|
||||
function(_, vim_item)
|
||||
local icons = {
|
||||
|
@ -154,9 +146,7 @@
|
|||
end
|
||||
'';
|
||||
snippet.expand =
|
||||
/*
|
||||
lua
|
||||
*/
|
||||
# lua
|
||||
''
|
||||
function(args)
|
||||
require('luasnip').lsp_expand(args.body)
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
|
||||
rustaceanvim = {
|
||||
enable = true;
|
||||
settings = {
|
||||
server.settings.files.excludeDirs = [".direnv"];
|
||||
dap.autoloadConfigurations = true;
|
||||
dap.adapter = let
|
||||
|
@ -55,4 +56,5 @@
|
|||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
cssls.enable = true;
|
||||
html.enable = true;
|
||||
# rust-analyzer should not be set here because of rustaceanvim
|
||||
nil_ls = {
|
||||
nil-ls = {
|
||||
enable = true;
|
||||
settings = {
|
||||
formatting.command = [(lib.getExe pkgs.alejandra) "--quiet"];
|
||||
|
|
|
@ -5,9 +5,7 @@
|
|||
enable = true;
|
||||
stages = "static";
|
||||
render.__raw =
|
||||
/*
|
||||
lua
|
||||
*/
|
||||
# lua
|
||||
''"compact"'';
|
||||
icons = {
|
||||
debug = "";
|
||||
|
|
|
@ -16,24 +16,16 @@
|
|||
"z" = "close_all_nodes";
|
||||
"Z" = "expand_all_nodes";
|
||||
"a".__raw =
|
||||
/*
|
||||
lua
|
||||
*/
|
||||
# lua
|
||||
''{ "add", config = { show_path = "relative" } }'';
|
||||
"A".__raw =
|
||||
/*
|
||||
lua
|
||||
*/
|
||||
# lua
|
||||
''{ "add_directory", config = { show_path = "relative" } }'';
|
||||
"c".__raw =
|
||||
/*
|
||||
lua
|
||||
*/
|
||||
# lua
|
||||
''{ "copy", config = { show_path = "relative" } }'';
|
||||
"m".__raw =
|
||||
/*
|
||||
lua
|
||||
*/
|
||||
# lua
|
||||
''{ "move", config = { show_path = "relative" } }'';
|
||||
};
|
||||
};
|
||||
|
|
|
@ -11,9 +11,7 @@
|
|||
|
||||
extraConfigLua =
|
||||
lib.mkBefore
|
||||
/*
|
||||
lua
|
||||
*/
|
||||
# lua
|
||||
''
|
||||
local onedark = require "onedark"
|
||||
onedark.setup {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue