feat(plugins): Add workspace-diagnostics.nvim
and trouble.nvim
Fix `nvim-navic` for some LSPs
This commit is contained in:
parent
b2f592d529
commit
9e58b1629d
11 changed files with 101 additions and 66 deletions
nvim/ftplugin
|
@ -17,8 +17,9 @@ vim.lsp.start {
|
|||
root_dir = vim.fs.dirname(vim.fs.find(root_files, { upward = true })[1]),
|
||||
capabilities = require('user.lsp').make_client_capabilities(),
|
||||
on_attach = function(client, bufnr)
|
||||
require("nvim-navic").attach(client, bufnr)
|
||||
end
|
||||
require("nvim-navic").attach(client, bufnr)
|
||||
require("workspace-diagnostics").populate_workspace_diagnostics(client, bufnr)
|
||||
end
|
||||
}
|
||||
|
||||
local dap = require("dap")
|
||||
|
@ -59,19 +60,19 @@ if vim.fn.executable('OpenDebugAD7') == 1 then
|
|||
return coroutine.create(function(coro)
|
||||
local opts = {}
|
||||
pickers
|
||||
.new(opts, {
|
||||
prompt_title = "Path to executable",
|
||||
finder = finders.new_oneshot_job({ "fd", "--hidden", "--no-ignore", "--type", "x" }, {}),
|
||||
sorter = conf.generic_sorter(opts),
|
||||
attach_mappings = function(buffer_number)
|
||||
actions.select_default:replace(function()
|
||||
actions.close(buffer_number)
|
||||
coroutine.resume(coro, action_state.get_selected_entry()[1])
|
||||
end)
|
||||
return true
|
||||
end,
|
||||
})
|
||||
:find()
|
||||
.new(opts, {
|
||||
prompt_title = "Path to executable",
|
||||
finder = finders.new_oneshot_job({ "fd", "--hidden", "--no-ignore", "--type", "x" }, {}),
|
||||
sorter = conf.generic_sorter(opts),
|
||||
attach_mappings = function(buffer_number)
|
||||
actions.select_default:replace(function()
|
||||
actions.close(buffer_number)
|
||||
coroutine.resume(coro, action_state.get_selected_entry()[1])
|
||||
end)
|
||||
return true
|
||||
end,
|
||||
})
|
||||
:find()
|
||||
end)
|
||||
end,
|
||||
stopAtBeginningOfMainSubprogram = true,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue