Update nixvim

This commit is contained in:
albert 2024-04-03 16:27:54 +09:00
parent cb01289dbb
commit 0e7cf5007b
No known key found for this signature in database
GPG key ID: 64F6C4EB46C4543A
2 changed files with 22 additions and 24 deletions

View file

@ -5,12 +5,6 @@
extraConfigLuaPost = '' extraConfigLuaPost = ''
local _border = "rounded" 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["textDocument/signatureHelp"] = vim.lsp.with (
vim.lsp.handlers.signature_help, { vim.lsp.handlers.signature_help, {
border = _border border = _border
@ -20,14 +14,9 @@
vim.diagnostic.config { vim.diagnostic.config {
float = { border = _border } float = { border = _border }
} }
vim.cmd [[nnoremap <buffer><silent> <C-space> :lua vim.lsp.diagnostic.show_line_diagnostics({ border = "single" })<CR>]]
vim.cmd [[nnoremap <buffer><silent> ]g :lua vim.lsp.diagnostic.goto_next({ popup_opts = { border = "single" }})<CR>]]
vim.cmd [[nnoremap <buffer><silent> [g :lua vim.lsp.diagnostic.goto_prev({ popup_opts = { border = "single" }})<CR>]]
vim.diagnostic.config { float={border=_border} }
require('lspconfig.ui.windows').default_options = { border = _border } require('lspconfig.ui.windows').default_options = { border = _border }
local signs = { Error = "󰅚 ", Warn = "󰀪 ", Hint = "󰌶 ", Info = " " } local signs = { Error = "󰅚 ", Warn = "󰀪 ", Hint = "󰌶 ", Info = " " }
for type, icon in pairs(signs) do for type, icon in pairs(signs) do
local hl = "DiagnosticSign" .. type local hl = "DiagnosticSign" .. type
vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = hl }) vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = hl })
@ -40,22 +29,19 @@
return orig_util_open_floating_preview(contents, syntax, opts, ...) return orig_util_open_floating_preview(contents, syntax, opts, ...)
end end
vim.diagnostic.config({ vim.diagnostic.config ( { virtual_text = { prefix = '', } } )
virtual_text = { vim.diagnostic.config { float = { border = _border } }
prefix = '',
}
})
LspDiagnosticsFloatingError = {fg=color1,bg=none,style='bold'};
LspDiagnosticsFloatingWarning = {fg=color2,bg=none,style='bold'};
LspDiagnosticsFloatingInformation = {fg=color3,bg=none,style='italic'};
LspDiagnosticsFloatingHint = {fg=color4,bg=none,style='italic'};
''; '';
plugins = { plugins = {
lsp-lines.enable = false; lsp-lines.enable = false;
lsp-lines.currentLine = true; lsp-lines.currentLine = true;
crates-nvim.enable = true; crates-nvim.enable = true;
lspsaga = {
enable = false;
lightbulb.enable = false;
ui.border = "rounded";
};
lsp = { lsp = {
enable = true; enable = true;
servers = { servers = {
@ -106,6 +92,11 @@
vim.diagnostic.open_float(nil, opts) vim.diagnostic.open_float(nil, opts)
end end
}) })
vim.lsp.handlers["textDocument/hover"] = vim.lsp.with (
vim.lsp.handlers.hover, {
border = "rounded",
}
)
''; '';
keymaps = { keymaps = {
silent = false; silent = false;

View file

@ -37,6 +37,9 @@
fugitive.enable = true; fugitive.enable = true;
# pretty stuff # pretty stuff
# Fancify markdown et al
# TODO Re-enable this after 24.05
# headlines.enable = true;
# Rainbow matching {} [] () 's # Rainbow matching {} [] () 's
rainbow-delimiters.enable = true; rainbow-delimiters.enable = true;
# Colorize hex colors inline # Colorize hex colors inline
@ -45,6 +48,7 @@
noice = { noice = {
enable = true; enable = true;
popupmenu.enabled = true; popupmenu.enabled = true;
lsp.hover.enabled = false;
}; };
notify = { notify = {
enable = true; enable = true;
@ -80,6 +84,8 @@
# tab bar like Firefox or Chrome # tab bar like Firefox or Chrome
bufferline = { bufferline = {
enable = true; enable = true;
hover.enabled = true;
separatorStyle = "slant";
offsets = [{ offsets = [{
filetype = "NvimTree"; filetype = "NvimTree";
text = "File Explorer"; text = "File Explorer";
@ -93,6 +99,7 @@
nvim-tree = { nvim-tree = {
enable = true; enable = true;
diagnostics.enable = true; diagnostics.enable = true;
tab.sync.close = true;
renderer = { renderer = {
highlightModified = "icon"; highlightModified = "icon";
highlightOpenedFiles = "all"; highlightOpenedFiles = "all";