The goal of this neovim configuration is to make a PDE(Personal Development Environment) based on the neovim editor. The philosophy is not to make everything inside nvim but instead use a set of external tools to achieve all the features offered by modern IDEs. Those should be:
- Code completion
- Code formatting
- Debugging
tree sitter requires a copiler. The LLVM toolchain is used for this reason
This repo can be cloned in the appropriate locations. More specifically this can be used in the nvim folder located
~/AppData/Local/nvim
~/.config/nvim
In addition some 3rd party tools must be installed and be set up at specific paths. The path that I choose to install those to is
%USERPROFILE%/bin
Those tools are:
- For C#
- Omnisharp-roslyn used for lsp services
- netcoredbg from samsung that is used for dap debugging
- .net provides it's own cli tools to format the code thus those can be used. The command is
dotnet format
- For C/C++ we install the LLVM distribution:
- This provides
clangdfor lsp capabilities. This requires acompile_commands.jsonfile. See bellow. clang-formatfor code formatting.
- This provides
In order for the LSP to work we need to have the compile_commands.json file that is normally generated by cmake.
Alternativelly we can keep track of this by hand but this is not quite easy unless we are dealing with a small project.
In order for the cmake to generate those commands we need to have the following:
cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=1 /path/to/src -G 'Unix Makefiles'
Additional languages will be added as I continue to experiment with the neovim config
<leader>fwill perform a file formatting if the file extension supports such formattingbhandblare buffer previous and buffer next
Bellow are the keybindings for fuzzy finding
<leader>ffFind Files<leader>gfGit files<leader>fbfind vim buffers<leader>fsfind symbols provided by the lsp<leader>evshow nvim config files<leader>scshow commands
gDgo to declarationgdgo to definition<leader>caperform code action<leader>rnrename symbol
osopen debugcsclose debug