mirror of
https://github.com/kossLAN/nvim-flake.git
synced 2025-11-05 02:09:49 -05:00
fix some lsp stuff for quick fix support
This commit is contained in:
parent
7804ae3939
commit
f3f07ab618
5 changed files with 39 additions and 7 deletions
|
|
@ -1,6 +1,6 @@
|
|||
-- Exit if the language server isn't available
|
||||
if vim.fn.executable('clangd') ~= 1 then
|
||||
return
|
||||
return
|
||||
end
|
||||
|
||||
local root_files = {
|
||||
|
|
@ -8,9 +8,12 @@ local root_files = {
|
|||
'src',
|
||||
}
|
||||
|
||||
local lsp = require('user.lsp')
|
||||
|
||||
vim.lsp.start {
|
||||
name = 'clangd',
|
||||
cmd = { 'clangd' },
|
||||
root_dir = vim.fs.dirname(vim.fs.find(root_files, { upward = true })[1]),
|
||||
capabilities = require('user.lsp').make_client_capabilities(),
|
||||
capabilities = lsp.make_client_capabilities(),
|
||||
on_attach = lsp.on_attach,
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue