Nvim Dev
Here is a quick list of my Neovim setup for dev work. This includes plugins, LSPs and some handy keymaps.
Plugins
- Telescope - Fuzzy find files quickly. No need for filetree with this one.
- Harpoon - Mark frequently visited files and get to them blazingly fast.
- Mason - This helps in installing language servers. Make sure you have mason-lspconfig.nvim and nvim-lspconfig.
- nvim-cmp - For completions. Make sure to also get Luasnip, cmp_luasnip, friendly-snippets and nvim-cmp-lsp.
- Neogit - Git integration.
- Copilot - Get copilot in neovim. Do not forget to get copilot-cmp as well.
- Treesitter - For some sweet syntax highlighting.
- Oil - Create directories and files. (You can also opt for Netrw)
LSPs
This section starts with must have LSPs. The optional section is just catered to my taste and programming languages I use.
- Snyk - Static code security checks in neovim as you code. I’ll write about how to get this working in Neovim as documentation might be a bit lacking.
- Lua-ls - How can you use neovim without it?
Optional
Keymaps
- For document symbols. View and jump around code symbols
vim.keymap.set('n', '<leader>ds',
':Telescope lsp_document_symbols<CR>',
{noremap = true, silent=true})
- For code actions
vim.keymap.set({ 'n', 'v' },
'<leader>ca',
vim.lsp.buf.code_action, {})
- Creating new file/directory
vim.keymap.set("n", "<C-n>",
":lua require('oil.actions').new()<CR>",
{ desc = "Create new file/directory in Oil" })
- Search keymaps
vim.keymap.set('n', '<leader>sk',
require("telescope.builtin").keymaps,
{ desc = '[S]earch Keymaps ' })
[!Note]
Part 2 which will be more cybersecurity focused