kekl
This commit is contained in:
@ -16,27 +16,27 @@ let
|
||||
in
|
||||
{
|
||||
programs.nixvim.plugins = {
|
||||
blink-cmp = {
|
||||
enable = true;
|
||||
};
|
||||
cmp = {
|
||||
enable = true;
|
||||
autoEnableSources = true;
|
||||
settings = {
|
||||
window = {
|
||||
completion = {
|
||||
autocomplete = true;
|
||||
col_offset = -3;
|
||||
side_padding = 0;
|
||||
};
|
||||
};
|
||||
completion = {
|
||||
completeopt = "menu,menuone,noinsert,noselect";
|
||||
keyword_length = 1;
|
||||
completeopt = [
|
||||
"menu"
|
||||
"menuone"
|
||||
"noinsert"
|
||||
"noselect"
|
||||
];
|
||||
};
|
||||
sorting = {
|
||||
comparators = [
|
||||
"require('cmp.config.compare').offset"
|
||||
"require('cmp.config.compare').exact"
|
||||
"require('cmp.config.compare').score"
|
||||
"require('clangd_extensions.cmp_scores')"
|
||||
"require('cmp.config.compare').recently_used"
|
||||
"require('cmp.config.compare').locality"
|
||||
"require('cmp.config.compare').kind"
|
||||
@ -45,12 +45,7 @@ in
|
||||
];
|
||||
};
|
||||
mapping = {
|
||||
"<C-Down>" = "cmp.mapping.scroll_docs(-4)";
|
||||
"<c-Up>" = "cmp.mapping.scroll_docs(4)";
|
||||
"<C-Space>" = "cmp.mapping.complete()";
|
||||
"<C-e>" = "cmp.mapping.abort()";
|
||||
"<C-Left>" = "cmp.mapping.abort()";
|
||||
"<Tab>".__raw = ''
|
||||
"<Down>".__raw = ''
|
||||
cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_next_item()
|
||||
@ -59,7 +54,8 @@ in
|
||||
end
|
||||
end, { "i", "s" })
|
||||
'';
|
||||
"<S-Tab>".__raw = ''
|
||||
|
||||
"<Up>".__raw = ''
|
||||
cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_prev_item()
|
||||
@ -68,6 +64,12 @@ in
|
||||
end
|
||||
end, { "i", "s" })
|
||||
'';
|
||||
|
||||
"<C-n>" = "cmp.mapping.scroll_docs(-4)";
|
||||
"<c-Up>" = "cmp.mapping.scroll_docs(4)";
|
||||
"<C-Space>" = "cmp.mapping.complete()";
|
||||
"<C-e>" = "cmp.mapping.abort()";
|
||||
"<C-Left>" = "cmp.mapping.abort()";
|
||||
"<CR>" = "cmp.mapping.confirm({ select = false })";
|
||||
};
|
||||
|
||||
@ -82,13 +84,6 @@ in
|
||||
inherit get_bufnrs;
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "nvim_lsp_signature_help";
|
||||
priority = 1000;
|
||||
option = {
|
||||
inherit get_bufnrs;
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "nvim_lsp_document_symbol";
|
||||
priority = 1000;
|
||||
@ -122,10 +117,6 @@ in
|
||||
name = "cmdline";
|
||||
priority = 300;
|
||||
}
|
||||
{
|
||||
name = "git";
|
||||
priority = 250;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
@ -26,9 +26,6 @@
|
||||
};
|
||||
};
|
||||
};
|
||||
marksman = {
|
||||
enable = true;
|
||||
};
|
||||
asm_lsp = {
|
||||
enable = true;
|
||||
};
|
||||
@ -38,9 +35,6 @@
|
||||
gopls = {
|
||||
enable = true;
|
||||
};
|
||||
yamlls = {
|
||||
enable = true;
|
||||
};
|
||||
rust_analyzer = {
|
||||
enable = true;
|
||||
autostart = true;
|
||||
|
@ -24,7 +24,11 @@
|
||||
vim.opt.autoindent = true
|
||||
vim.opt.smartindent = true
|
||||
vim.opt.softtabstop = 4
|
||||
vim.opt.number = true;
|
||||
vim.opt.number = true
|
||||
vim.diagnostic.config({
|
||||
virtual_text = false,
|
||||
virtual_lines = false,
|
||||
})
|
||||
vim.cmd [[
|
||||
cnoreabbrev W! w!
|
||||
cnoreabbrev Q! q!
|
||||
@ -38,26 +42,6 @@
|
||||
cnoreabbrev Qall qall
|
||||
]]
|
||||
|
||||
local _border = "rounded"
|
||||
vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(
|
||||
vim.lsp.handlers.hover, {
|
||||
border = _border
|
||||
}
|
||||
)
|
||||
|
||||
vim.lsp.handlers["textDocument/signatureHelp"] = vim.lsp.with(
|
||||
vim.lsp.handlers.signature_help, {
|
||||
border = _border
|
||||
}
|
||||
)
|
||||
|
||||
vim.diagnostic.config{
|
||||
float={border=_border}
|
||||
};
|
||||
|
||||
require('lspconfig.ui.windows').default_options = {
|
||||
border = _border
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user