nvim: add plugin trouble
This commit is contained in:
parent
1cb99ef623
commit
dc54a413ce
6
sub/nvim/after/plugin/mason-lspconfig.lua
Normal file
6
sub/nvim/after/plugin/mason-lspconfig.lua
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
|
||||||
|
local status, mason_lspconfig = pcall(require, "mason-lspconfig")
|
||||||
|
if (not status) then return end
|
||||||
|
|
||||||
|
|
||||||
|
mason_lspconfig.setup()
|
||||||
6
sub/nvim/after/plugin/mason.lua
Normal file
6
sub/nvim/after/plugin/mason.lua
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
|
||||||
|
local status, mason = pcall(require, "mason")
|
||||||
|
if (not status) then return end
|
||||||
|
|
||||||
|
|
||||||
|
mason.setup()
|
||||||
17
sub/nvim/after/plugin/trouble.lua
Normal file
17
sub/nvim/after/plugin/trouble.lua
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
|
||||||
|
local status, trouble = pcall(require, "trouble")
|
||||||
|
if (not status) then return end
|
||||||
|
|
||||||
|
trouble.setup()
|
||||||
|
|
||||||
|
|
||||||
|
local function set_trouble_keymap(key, cmd)
|
||||||
|
local opts = {silent = true, noremap = true}
|
||||||
|
vim.keymap.set("n", string.format("<Leader>x%s", key), cmd, opts)
|
||||||
|
end
|
||||||
|
|
||||||
|
set_trouble_keymap("x", "<cmd>TroubleToggle<cr>")
|
||||||
|
set_trouble_keymap("w", "<cmd>TroubleToggle workspace_diagnostics<cr>")
|
||||||
|
set_trouble_keymap("d", "<cmd>TroubleToggle document_diagnostics<cr>")
|
||||||
|
set_trouble_keymap("l", "<cmd>TroubleToggle loclist<cr>")
|
||||||
|
set_trouble_keymap("q", "<cmd>TroubleToggle quickfix<cr>")
|
||||||
@ -1,9 +1,12 @@
|
|||||||
|
vim.cmd([[packadd packer.nvim]])
|
||||||
|
|
||||||
|
|
||||||
return require('packer').startup(function(use)
|
return require('packer').startup(function(use)
|
||||||
use 'wbthomason/packer.nvim'
|
use 'wbthomason/packer.nvim'
|
||||||
|
|
||||||
use {
|
use {
|
||||||
'nvim-lualine/lualine.nvim',
|
'nvim-lualine/lualine.nvim',
|
||||||
requires = { 'kyazdani42/nvim-web-devicons', opt = true }
|
requires = { 'kyazdani42/nvim-web-devicons' }
|
||||||
}
|
}
|
||||||
|
|
||||||
use 'ellisonleao/gruvbox.nvim'
|
use 'ellisonleao/gruvbox.nvim'
|
||||||
@ -32,12 +35,21 @@ return require('packer').startup(function(use)
|
|||||||
config = function() require('Comment').setup() end
|
config = function() require('Comment').setup() end
|
||||||
}
|
}
|
||||||
|
|
||||||
-- pyright
|
use { 'folke/trouble.nvim',
|
||||||
|
requires = { 'kyazdani42/nvim-web-devicons' }
|
||||||
|
}
|
||||||
|
|
||||||
use 'neovim/nvim-lspconfig'
|
use 'neovim/nvim-lspconfig'
|
||||||
use 'hrsh7th/nvim-cmp'
|
use 'hrsh7th/nvim-cmp'
|
||||||
use 'hrsh7th/cmp-nvim-lsp'
|
use 'hrsh7th/cmp-nvim-lsp'
|
||||||
use 'saadparwaiz1/cmp_luasnip'
|
use 'saadparwaiz1/cmp_luasnip'
|
||||||
use 'L3MON4D3/LuaSnip'
|
use 'L3MON4D3/LuaSnip'
|
||||||
|
use {
|
||||||
|
'williamboman/mason.nvim',
|
||||||
|
requires = {
|
||||||
|
"williamboman/mason-lspconfig.nvim"
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
use {
|
use {
|
||||||
'nvim-telescope/telescope.nvim',
|
'nvim-telescope/telescope.nvim',
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user