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