A personal Neovim config lua along with c++ auto completion using clangd, all configured using lsp
Took a lot of reference from
Theirs repos and youtube videos were really helpful
- autopairs
- lua-plenary
- nvim-dev-icons
- nvim-telescope
- telescope-file-browser
- null-ls
- lsp-saga
- nvim-colorizer
- akinsho-bufferline
- akinsho-toggleterm
- nvim-lualine
- gitsigns
- numToStr-comment
- nvim-ts-context-commentstring
- nvim-cursorline
- vim-illuminate
- impatient
- nvim-cmp
- mason-lspconfig
- nvim-treesitter
- nvim-surround
- alpha-nvim
- preservevim-tagbar
- markdown-preview
- git.nvim
- zen-mode.nvim
- lsp-colors.nvim
- vimwiki[still testing]
- neorg[still testing]
- project.nvim [still testing]
- which-key.nvim [still testing]
- gruvbox-material [active theme]
- tokyonight
- onedark
- Create a new directory inside
.config/
folder named asnvim
(mkdir .config/nvim
) - or you could just clone this repo inside
.config/
directory and change the name of current fromneovim-lsp/
tonvim/
then place it inside.config/
git clone https://github.com/Appyouz/neovim-lsp.git
- open
plugins.lua
file located insidenv lua/user/plugins.lua
Note: You will be presented with bunch of errors, just dont freak out everything will be fine once plugins are installed.
Neovim is trying to load the configuaration files located inside after/plugin/
.
- once plugins are installed, close the file and reopen again
:wq
- on oepening neovim again, nvim-treesitter will begin to load and compile just wait for it. it might show some errors dont worry it will work after reloading. (those errors do not seem to get in the way)
Now you can install your required language-servers using Mason
:Mason
You need to install ctags in order for preservim/tagbar to work. You can find ctags available in official repos of your linux distribution.
Keymaps | Descriptions |
---|---|
<C-b> | Up scrolling docs |
<C-f> | Down scrolling docs |
<C-Space> | complete |
<C-e> | abort completion |
<CR> | confirm completion |
<Tab> | Down scrolling snippets |
<Shift-Tab> | Up scrolling snippets |
Keymaps | Descriptions |
---|---|
gD | go to definition |
K | buf.hover shows more info |
[d | diagnostic jump prev |
]d | diagnostic jump next |
<space>wa | add workspace folder |
<space>wr | remove workspace folder |
<space>wl | list workspace folder |
<space>f | formatting |
<space>wl | list workspace folder |
<space>rn | lsp saga rename |
<space>ca | lsp saga code action |
Keymaps | Descriptions |
---|---|
gcc | line comment |
gb | block comment |
In order to see shortcut keys you can press leader(space key) and a popup will come listing shortcut keys for this setup. space key is prefix. Check after/plugin/which-key.lua to find its config
Note: you will need to setup your language servers inside the lua/user/lsp/lsp.lua
using lsp, for the full list of configs check server_configurations.md