Skip to content

adamatom/clangd-db-picker.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

clangd-db-picker.nvim

A tiny helper for C/C++ projects: pick a compile_commands.json, generate a repo-local .clangd that points to it, and restart clangd with the right --target, --sysroot, and -isystem include dirs derived from your compiler.

Features

  • Telescope picker to choose among multiple compile_commands.json in a repo
  • Infers compiler, language, target, sysroot, and system include paths
  • Writes a minimal .clangd with CompilationDatabase + flags
  • Restarts clangd for the repository automatically

Requirements

  • Neovim 0.10+
  • telescope.nvim
  • A working toolchain (clang/gcc) in $PATH

Installation

lazy.nvim

{
  "adamatom/clangd-db-picker.nvim",
  dependencies = { "nvim-telescope/telescope.nvim" },
  keys = {
    {
      "<leader>cc",
      "<cmd>ClangdDbPick<cr>",
      desc = "Pick compile_commands.json (clangd-db-picker)",
    },
  },
  config = function()
    require("clangd_db_picker").setup({
      -- extra_isystem = {"/opt/toolchain/include"},
    })
  end,
}

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages