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
clangd
for lsp capabilities. This requires acompile_commands.json
file. See bellow. clang-format
for 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>f
will perform a file formatting if the file extension supports such formattingbh
andbl
are buffer previous and buffer next
Bellow are the keybindings for fuzzy finding
<leader>ff
Find Files<leader>gf
Git files<leader>fb
find vim buffers<leader>fs
find symbols provided by the lsp<leader>ev
show nvim config files<leader>sc
show commands
gD
go to declarationgd
go to definition<leader>ca
perform code action<leader>rn
rename symbol
os
open debugcs
close debug