mirror of
https://github.com/zoriya/dotfiles.git
synced 2026-06-08 12:42:02 +00:00
wip: adding trouble
This commit is contained in:
@@ -55,6 +55,7 @@ return packer.startup(function(use)
|
||||
{ 'nvim-telescope/telescope-fzf-native.nvim', run = 'make' },
|
||||
'stevearc/dressing.nvim',
|
||||
}
|
||||
use { "folke/trouble.nvim", requires = "kyazdani42/nvim-web-devicons" }
|
||||
use "folke/which-key.nvim"
|
||||
use "akinsho/toggleterm.nvim"
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
require "windows.toggleterm"
|
||||
require "windows.which-key"
|
||||
require "windows.telescope"
|
||||
require "windows.trouble"
|
||||
|
||||
|
||||
@@ -3,6 +3,8 @@ if not status_ok then
|
||||
return
|
||||
end
|
||||
|
||||
local actions = require "telescope.actions"
|
||||
|
||||
telescope.setup({
|
||||
defaults = {
|
||||
prompt_prefix = " ",
|
||||
@@ -15,6 +17,14 @@ telescope.setup({
|
||||
}
|
||||
},
|
||||
path_display = { "truncate" },
|
||||
mappings = {
|
||||
i = {
|
||||
["<CR>"] = actions.file_edit
|
||||
},
|
||||
n = {
|
||||
["<CR>"] = actions.file_edit
|
||||
},
|
||||
},
|
||||
},
|
||||
extensions = {
|
||||
fzf = {
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
local status_ok, trouble = pcall(require, "trouble")
|
||||
if not status_ok then
|
||||
return
|
||||
end
|
||||
|
||||
trouble.setup({
|
||||
auto_close = false,
|
||||
})
|
||||
|
||||
local wk = require("which-key")
|
||||
wk.register({
|
||||
l = {
|
||||
d = { "<cmd>Trouble document_diagnostics<cr>", "Document Diagnostics" },
|
||||
w = { "<cmd>Trouble workspace_diagnostics<cr>", "Workspace Diagnostics" },
|
||||
},
|
||||
}, {
|
||||
prefix = "<leader>",
|
||||
})
|
||||
Reference in New Issue
Block a user