make lsp to update in insert mode

This commit is contained in:
Jozef Steinhübl 2023-08-21 15:33:55 +02:00
parent c1ea8971cb
commit 617fea026b
4 changed files with 34 additions and 1 deletions

View file

@ -58,5 +58,8 @@ end)
lsp.setup()
vim.diagnostic.config({
virtual_text = true
virtual_text = true,
update_in_insert = true,
underline = true,
signs = true
})

View file

@ -0,0 +1,21 @@
require("toggleterm").setup({
start_in_insert = true,
insert_mappings = true,
terminal_mappings = true,
persist_size = true,
direction = 'horizontal',
close_on_exit = true,
shell = vim.o.shell,
float_opts = {
border = 'curved',
},
winbar = {
enabled = false,
name_formatter = function(term) -- term: Terminal
return term.name
end
},
})
vim.keymap.set("n", "<leader>tt", vim.cmd.ToggleTerm);
vim.keymap.set("n", "<leader>tf", function() vim.cmd.ToggleTerm("direction=float") end);

View file

@ -42,4 +42,8 @@ return require("packer").startup(function(use)
{"L3MON4D3/LuaSnip"}, -- Required
}
}
use {
"akinsho/toggleterm.nvim", tag = '*'
}
end)

View file

@ -149,6 +149,11 @@ _G.packer_plugins = {
path = "/home/hyro/.local/share/nvim/site/pack/packer/start/telescope.nvim",
url = "https://github.com/nvim-telescope/telescope.nvim"
},
["toggleterm.nvim"] = {
loaded = true,
path = "/home/hyro/.local/share/nvim/site/pack/packer/start/toggleterm.nvim",
url = "https://github.com/akinsho/toggleterm.nvim"
},
undotree = {
loaded = true,
path = "/home/hyro/.local/share/nvim/site/pack/packer/start/undotree",