Nvim Dev

Here is a quick list of my Neovim setup for dev work. This includes plugins, LSPs and some handy keymaps.

Plugins

  1. Telescope - Fuzzy find files quickly. No need for filetree with this one.
  2. Harpoon - Mark frequently visited files and get to them blazingly fast.
  3. Mason - This helps in installing language servers. Make sure you have mason-lspconfig.nvim and nvim-lspconfig.
  4. nvim-cmp - For completions. Make sure to also get Luasnip, cmp_luasnip, friendly-snippets and nvim-cmp-lsp.
  5. Neogit - Git integration.
  6. Copilot - Get copilot in neovim. Do not forget to get copilot-cmp as well.
  7. Treesitter - For some sweet syntax highlighting.
  8. 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.

  1. 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.
  2. Lua-ls - How can you use neovim without it?

Optional

  1. zls - Because I write zig.
  2. pylyzer - I write python as well. Fast and slow :D

Keymaps

  1. For document symbols. View and jump around code symbols
vim.keymap.set('n', '<leader>ds',
    ':Telescope lsp_document_symbols<CR>',
    {noremap = true, silent=true})
  1. For code actions
vim.keymap.set({ 'n', 'v' },
    '<leader>ca',
    vim.lsp.buf.code_action, {})
  1. Creating new file/directory
vim.keymap.set("n", "<C-n>",
    ":lua require('oil.actions').new()<CR>",
    { desc = "Create new file/directory in Oil" })
  1. 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