lazy clangd
This commit is contained in:
parent
9550090c6a
commit
22b264311a
|
@ -144,14 +144,14 @@ return {
|
||||||
pattern = '*',
|
pattern = '*',
|
||||||
callback = function(args)
|
callback = function(args)
|
||||||
local ft = vim.bo[args.buf].filetype
|
local ft = vim.bo[args.buf].filetype
|
||||||
if vim.tbl_contains(M.clang_filetypes, ft) then
|
if vim.tbl_contains(require('custom.plugins.lsp.clangd').clang_filetypes, ft) then
|
||||||
print('[clangd] BufReadPost fired for ft=' .. ft)
|
local M = require 'custom.plugins.lsp.clangd'
|
||||||
local dir = find_compile_commands()
|
local dir = M.find_compile_commands()
|
||||||
M.start_clangd(dir)
|
M.start_clangd(dir)
|
||||||
vim.keymap.set('n', '<leader>lc', M.pick_commands_dir, { desc = '[L]ocate [c]ompile_commands.json for clangd' })
|
|
||||||
vim.api.nvim_clear_autocmds { group = 'clangd-once' }
|
vim.api.nvim_clear_autocmds { group = 'clangd-once' }
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
vim.keymap.set('n', '<leader>lc', M.pick_commands_dir, { desc = '[L]ocate [c]ompile_commands.json for clangd' })
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue