move trouble
This commit is contained in:
@ -332,7 +332,6 @@ cmp.setup({
|
||||
},
|
||||
|
||||
experimental = {
|
||||
native_menu = false,
|
||||
ghost_text = true,
|
||||
},
|
||||
})
|
||||
|
@ -1,32 +0,0 @@
|
||||
vim.diagnostic.config({
|
||||
virtual_lines = true,
|
||||
virtual_text = true,
|
||||
severity_sort = true,
|
||||
update_in_insert = true,
|
||||
})
|
||||
|
||||
-- Diagnostics
|
||||
require("trouble").setup({
|
||||
signs = {
|
||||
-- icons / text used for a diagnostic
|
||||
error = " ",
|
||||
warning = " ",
|
||||
hint = " ",
|
||||
information = " ",
|
||||
other = "?",
|
||||
},
|
||||
use_diagnostic_signs = false, -- enabling this will use the signs defined in your lsp client
|
||||
})
|
||||
|
||||
-- Mappings
|
||||
local opts = { noremap = true, silent = true }
|
||||
vim.api.nvim_set_keymap("n", "gr", "<Cmd>Trouble lsp_references<CR>", opts)
|
||||
vim.api.nvim_set_keymap("n", "<Leader>xx", "<Cmd>Trouble<CR>", opts)
|
||||
vim.api.nvim_set_keymap("n", "<Leader>xw", "<Cmd>Trouble workspace_diagnostics<CR>", opts)
|
||||
vim.api.nvim_set_keymap("n", "<Leader>xd", "<Cmd>Trouble document_diagnostics<CR>", opts)
|
||||
vim.api.nvim_set_keymap("n", "<Leader>xl", "<Cmd>Trouble loclist<CR>", opts)
|
||||
vim.api.nvim_set_keymap("n", "<Leader>xq", "<Cmd>Trouble quickfix<CR>", opts)
|
||||
vim.api.nvim_set_keymap("n", "[g", "<cmd>lua vim.diagnostic.goto_prev()<CR>", opts)
|
||||
vim.api.nvim_set_keymap("n", "]g", "<cmd>lua vim.diagnostic.goto_next()<CR>", opts)
|
||||
|
||||
vim.cmd([[autocmd! CursorHold,CursorHoldI * lua vim.diagnostic.open_float(nil, {focus=false})]])
|
@ -88,7 +88,6 @@ return {
|
||||
{
|
||||
"hrsh7th/nvim-cmp",
|
||||
event = "VimEnter",
|
||||
|
||||
dependencies = {
|
||||
"onsails/lspkind.nvim",
|
||||
"neovim/nvim-lspconfig",
|
||||
@ -114,19 +113,6 @@ return {
|
||||
event = "InsertEnter",
|
||||
cond = not use_google(),
|
||||
},
|
||||
{
|
||||
"ErichDonGubler/lsp_lines.nvim",
|
||||
event = "VimEnter",
|
||||
keys = {
|
||||
{
|
||||
"<leader>l",
|
||||
function()
|
||||
require("lsp_lines").toggle()
|
||||
end,
|
||||
desc = "Toggle LSP Lines",
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
"jose-elias-alvarez/null-ls.nvim",
|
||||
event = "VimEnter",
|
||||
@ -134,7 +120,6 @@ return {
|
||||
require("config.null-ls")
|
||||
end,
|
||||
},
|
||||
|
||||
-- Rust
|
||||
{
|
||||
"saecki/crates.nvim",
|
||||
@ -148,14 +133,6 @@ return {
|
||||
|
||||
{ "simrat39/rust-tools.nvim", ft = "rust" },
|
||||
|
||||
{
|
||||
"folke/trouble.nvim",
|
||||
event = "VimEnter",
|
||||
config = function()
|
||||
require("config.trouble")
|
||||
end,
|
||||
},
|
||||
|
||||
{
|
||||
"ThePrimeagen/refactoring.nvim",
|
||||
dependencies = {
|
||||
|
19
vim/.vim/lua/plugins/lsp_lines.lua
Normal file
19
vim/.vim/lua/plugins/lsp_lines.lua
Normal file
@ -0,0 +1,19 @@
|
||||
return {
|
||||
url = "https://git.sr.ht/~whynothugo/lsp_lines.nvim",
|
||||
name = "lsp_lines.nvim",
|
||||
-- "ErichDonGubler/lsp_lines.nvim",
|
||||
lazy = false,
|
||||
config = function()
|
||||
require("lsp_lines").setup()
|
||||
end,
|
||||
keys = {
|
||||
{
|
||||
"<leader>l",
|
||||
":lua require('lsp_lines').toggle()<CR>",
|
||||
-- function()
|
||||
-- require("lsp_lines").toggle()
|
||||
-- end,
|
||||
desc = "Toggle LSP Lines",
|
||||
},
|
||||
},
|
||||
}
|
35
vim/.vim/lua/plugins/trouble.lua
Normal file
35
vim/.vim/lua/plugins/trouble.lua
Normal file
@ -0,0 +1,35 @@
|
||||
return {
|
||||
"folke/trouble.nvim",
|
||||
event = "VimEnter",
|
||||
config = function()
|
||||
vim.diagnostic.config({
|
||||
virtual_lines = true,
|
||||
virtual_text = true,
|
||||
severity_sort = true,
|
||||
update_in_insert = true,
|
||||
})
|
||||
|
||||
-- Diagnostics
|
||||
require("trouble").setup({
|
||||
signs = {
|
||||
-- icons / text used for a diagnostic
|
||||
error = " ",
|
||||
warning = " ",
|
||||
hint = " ",
|
||||
information = " ",
|
||||
other = "?",
|
||||
},
|
||||
use_diagnostic_signs = false, -- enabling this will use the signs defined in your lsp client
|
||||
})
|
||||
end,
|
||||
keys = {
|
||||
{ "gr", "<Cmd>Trouble lsp_references<CR>" },
|
||||
{ "<Leader>xx", "<Cmd>Trouble<CR>" },
|
||||
{ "<Leader>xw", "<Cmd>Trouble workspace_diagnostics<CR>" },
|
||||
{ "<Leader>xd", "<Cmd>Trouble document_diagnostics<CR>" },
|
||||
{ "<Leader>xl", "<Cmd>Trouble loclist<CR>" },
|
||||
{ "<Leader>xq", "<Cmd>Trouble quickfix<CR>" },
|
||||
{ "[g", "<cmd>lua vim.diagnostic.goto_prev()<CR>" },
|
||||
{ "]g", "<cmd>lua vim.diagnostic.goto_next()<CR>" },
|
||||
},
|
||||
}
|
Reference in New Issue
Block a user