Compare commits

..

2 Commits

4 changed files with 15 additions and 7 deletions

View File

@ -16,13 +16,9 @@ vim.opt.tabstop = 2
vim.opt.shiftwidth = 2
vim.opt.updatetime = 300
vim.opt.timeoutlen = 2000
-- vim.opt.ttimeoutlen = 5
-- vim.cmd "set notimeout"
-- vim.cmd "set ttimeout"
vim.opt.signcolumn = "yes:2"
vim.opt.jumpoptions = "stack,view"
vim.opt.keymap = "russian-jcukenwin"
vim.opt.iminsert = 0
vim.opt.imsearch = 0

View File

@ -2,7 +2,7 @@ local M = {}
M.setup = function()
local config = {
virtual_text = true,
virtual_text = false,
signs = {
text = {
[vim.diagnostic.severity.ERROR] = '',
@ -12,7 +12,7 @@ M.setup = function()
}
},
update_in_insert = true,
underline = true,
underline = false,
severity_sort = true,
float = {
focusable = true,

View File

@ -19,6 +19,18 @@ return {
require("user.plugins.lsp.diagnostics_config").setup()
-- require("user.lsp.none_ls")
local which_key = require("which-key")
which_key.add({
{
"<leader>ch",
function()
local current = vim.diagnostic.config().virtual_text
vim.diagnostic.config({ virtual_text = not current })
end,
desc = "toggle inline diagnostics"
},
})
vim.cmd([[ command! Format execute 'lua vim.lsp.buf.format{async=true}' ]])
end,
},

View File

@ -99,7 +99,7 @@ return {
})
which_key.add({
{ "<leader>l", "<cmd>lua vim.diagnostic.setloclist()<CR>", desc = "Show diagnostic list" },
{ "<leader>cd", "<cmd>lua vim.diagnostic.setloclist()<CR>", desc = "Show diagnostic list" },
})
which_key.add({