Skip to content

hyaldiz/NvimConf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

NvimConf

A minimal and clean Neovim configuration focused on C and C++ development using clangd (LSP).

  • init.lua (Neovim 0.11.x) - C/C++ + CMake + Makefile/Autotools
  • LSP: clangd, cmake, autotools_ls
  • Completion: nvim-cmp
  • Formatting: conform.nvim (clang-format + optional cmake-format)
  • Plugin manager: lazy.nvim (auto bootstrap)

Requirements

Neovim

Make sure Neovim is installed:

nvim --version

Neovim 0.10+ is recommended.


clangd (Required for C/C++)

C and C++ language features such as:

  • Autocomplete
  • Go to definition
  • Find references
  • Diagnostics
  • Code navigation

require clangd.

Install on Ubuntu/Debian:

sudo apt update
sudo apt install clangd

Verify installation:

clangd --version

Installation

1. Clone the repository

git clone git@github.com:hyaldiz/NvimConf.git

2. Copy configuration to Neovim directory

Neovim config directory (Linux):

~/.config/nvim/

Copy the config:

mkdir -p ~/.config/nvim
cp -r NvimConf/nvim/* ~/.config/nvim/

Or sync:

rsync -av NvimConf/nvim/ ~/.config/nvim/

3. Install plugins

Start Neovim:

nvim

Then run:

:Lazy sync

Restart Neovim after plugin installation.


C/C++ Setup (Important)

For proper C/C++ , your project should contain a compile_commands.json file in the project root.

If using CMake:

cmake -S . -B build -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
ln -sf build/compile_commands.json compile_commands.json

Compiler flags

cmake -S . -B build \
  -DCMAKE_EXPORT_COMPILE_COMMANDS=ON

Happy coding 🚀

About

Represents my nvim lua configuration

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages