Skip to content

Commit

Permalink
fix(nvim): remove telescope-luasnip.nvim, update clangd config
Browse files Browse the repository at this point in the history
  • Loading branch information
jiangyinzuo committed Jun 9, 2024
1 parent f7995e1 commit 85bad5b
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 5 deletions.
4 changes: 4 additions & 0 deletions project_files/.clangd
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
CompileFlags:
# use absolute path
CompilationDatabase: /home/jiangyinzuo/gpudb-project-ictdb/gpudb-project-code-ictdb/duckdb-anns/build/debug

5 changes: 3 additions & 2 deletions project_files/cpp.project.vim
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
" Clangd
let g:nvim_lsp_autostart = {'clangd': v:true}
let g:clangd_args = ["--clang-tidy", "--compile-commands-dir=build_debug", "--pretty", "--background-index", "--header-insertion=iwyu"]
let g:clangd_cmd = [g:clangd_path] + g:clangd_args
" use `CompilationDatabase` in .clangd instead
" let g:clangd_args = ["--clang-tidy", "--compile-commands-dir=build_debug", "--pretty", "--background-index", "--header-insertion=iwyu"]
" let g:clangd_cmd = [g:clangd_path] + g:clangd_args

" Ccls
" let g:nvim_lsp_autostart = {'ccls': v:true}
Expand Down
2 changes: 1 addition & 1 deletion root/.config/nvim/lua/plugins/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ return {
"rmagatti/auto-session",
"nvim-tree/nvim-web-devicons",
"nvim-telescope/telescope-bibtex.nvim",
"benfowler/telescope-luasnip.nvim",
-- "benfowler/telescope-luasnip.nvim",
},
config = plugins_setup.telescope,
},
Expand Down
2 changes: 1 addition & 1 deletion root/.config/nvim/lua/plugins_setup.lua
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ function M.telescope()
telescope.load_extension("advanced_git_search")
telescope.load_extension("session-lens")
telescope.load_extension("bibtex")
telescope.load_extension("luasnip")
-- telescope.load_extension("luasnip")
end

function M.mason()
Expand Down
5 changes: 4 additions & 1 deletion root/.vim/vimrc
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,10 @@ if has('autocmd') " vim-tiny does not have autocmd
let g:coc_global_extensions = get(g:, 'coc_global_extensions', [])

let g:clangd_path = get(g:, 'clangd_path', '/usr/bin/clangd')
let g:clangd_args = get(g:, 'clangd_args', ["--clang-tidy", "--compile-commands-dir=build", "--pretty", "--background-index", "--header-insertion=iwyu"])
" use CompilationDatabase instead (absolute path)
" See: https://clangd.llvm.org/config#compilationdatabase
" let g:clangd_args = get(g:, 'clangd_args', ["--clang-tidy", "--compile-commands-dir=build", "--pretty", "--background-index", "--header-insertion=iwyu"])
let g:clangd_args = get(g:, 'clangd_args', ["--clang-tidy", "--pretty", "--background-index", "--header-insertion=iwyu"])
let g:clangd_cmd = [g:clangd_path] + g:clangd_args
let g:clang_format = get(g:, 'clang_format', 'clang-format')
" black, ruff
Expand Down

0 comments on commit 85bad5b

Please sign in to comment.