summaryrefslogtreecommitdiff
path: root/vim/.config/nvim/lsp/clangd.lua
diff options
context:
space:
mode:
Diffstat (limited to 'vim/.config/nvim/lsp/clangd.lua')
-rw-r--r--vim/.config/nvim/lsp/clangd.lua33
1 files changed, 33 insertions, 0 deletions
diff --git a/vim/.config/nvim/lsp/clangd.lua b/vim/.config/nvim/lsp/clangd.lua
new file mode 100644
index 0000000..a3add02
--- /dev/null
+++ b/vim/.config/nvim/lsp/clangd.lua
@@ -0,0 +1,33 @@
+return {
+ cmd = {
+ 'clangd',
+ -- '--clang-tidy',
+ '--background-index',
+ '--offset-encoding=utf-8',
+ '--query-driver=/Users/scie/.platformio/packages/toolchain-xtensa-esp32/**',
+ '--query-driver=/Users/scie/.platformio/packages/framework-arduinoststm32/**',
+ -- '--query-driver=/Users/scie/.platformio/packages/**',
+ -- '--query-driver=/opt/homebrew/Cellar/avr-gcc@9/9.4.0_1/bin/avr-gcc',
+ -- '--query-driver=/opt/homebrew/Cellar/avr-gcc@9/9.4.0_1/bin/avr-g++'
+ },
+ filetypes = { 'c', 'cpp', 'objc', 'objcpp', 'cuda', 'proto', 'arduino' },
+ root_markers = {
+ '.clangd',
+ '.clang-tidy',
+ '.clang-format',
+ 'compile_commands.json',
+ 'compile_flags.txt',
+ 'configure.ac', -- AutoTools
+ '.git',
+ '.jj'
+ },
+ single_file_support = true,
+ capabilities = {
+ textDocument = {
+ completion = {
+ editsNearCursor = true,
+ },
+ },
+ offsetEncoding = { 'utf-8', 'utf-16' },
+ },
+}