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