My personal vim config, started with a minimalist config kickstart
External Requirements:
- Basic utils:
git
,make
,unzip
, C Compiler (gcc
) - ripgrep
- Language Setup:
- If want to write Typescript, you need
npm
- If want to write Golang, you will need
go
- etc.
- If want to write Typescript, you need
NOTE See Windows Installation to double check any additional Windows notes
Neovim's configurations are located under the following paths, depending on your OS:
OS | PATH |
---|---|
Linux, MacOS | $XDG_CONFIG_HOME/nvim , ~/.config/nvim |
Windows (cmd) | %userprofile%\AppData\Local\nvim\ |
Windows (powershell) | $env:USERPROFILE\AppData\Local\nvim\ |
Start Neovim
nvim
run :Lazy
and sync all the plugins. This should happen automatically though.
Run :Mason
to install linters etc.
Adding autopairs
This will automatically install windwp/nvim-autopairs and enable it on startup. For more information, see documentation for lazy.nvim.
In the file: lua/custom/plugins/autopairs.lua
, add:
-- File: lua/custom/plugins/autopairs.lua
return {
"windwp/nvim-autopairs",
-- Optional dependency
dependencies = { 'hrsh7th/nvim-cmp' },
config = function()
require("nvim-autopairs").setup {}
-- If you want to automatically add `(` after selecting a function or method
local cmp_autopairs = require('nvim-autopairs.completion.cmp')
local cmp = require('cmp')
cmp.event:on(
'confirm_done',
cmp_autopairs.on_confirm_done()
)
end,
}
Adding a file tree plugin
This will install the tree plugin and add the command :Neotree
for you. You can explore the documentation at neo-tree.nvim for more information.
In the file: lua/custom/plugins/filetree.lua
, add:
-- Unless you are still migrating, remove the deprecated commands from v1.x
vim.cmd([[ let g:neo_tree_remove_legacy_commands = 1 ]])
return {
"nvim-neo-tree/neo-tree.nvim",
version = "*",
dependencies = {
"nvim-lua/plenary.nvim",
"nvim-tree/nvim-web-devicons", -- not strictly required, but recommended
"MunifTanjim/nui.nvim",
},
config = function ()
require('neo-tree').setup {}
end,
}
Installation may require installing build tools, and updating the run command for telescope-fzf-native
See telescope-fzf-native
documentation for more details
This requires:
- Install CMake, and the Microsoft C++ Build Tools on Windows
{'nvim-telescope/telescope-fzf-native.nvim', build = 'cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build' }