Sennvim is a simple and lightweight vim configuration for Python, Go, and TypeScript development.
This neovim configuration uses these packages under the hood. Install with homebrew:
brew install lazygit fzf ripgrep regex yazi
Or use your preferred package manager.
The Python LSP setup uses a Ruff config. You can grab my config here.
Put it in ~/.config/ruff
. If you store it elsewhere, remember to update lua/config/lauguages/python.lua
.
Make a backup of your current nvim configuration, just in case you want to go back later. Once backed up, delete them. The default directories are:
~/.config/nvim
~/.local/share/nvim
~/.local/state/nvim
~/.cache/nvim
Now clone this repository into your nvim directory:
git clone https://github.com/ionztorm/sennvim.git ~/.config/nvim
Next, remove the git dir. You can keep plugins updated via the :Lazy
command within neovim.
rm -rf ~/.config/nvim/.git .gitignore
Run nvim.
If you want to check out my full dev environment, my dotfiles are public. I cover a setup guide for Mac here
Sennvim uses the following plugins:
- Lazy.nvim - for plugin management.
- LSP Config - for language server protocol.
- Mason - for lsp/formatter/linter management.
- Mason LSP Config - for lsp/formatter/linter management.
- Conform - For auto formatting.
- nvim lint - for linting.
- Blink CMP - for autocompletion.
- Copilot - AI Assistant - will need some custom work to change this.
- Treesitter - for syntax highlighting.
- Gitsigns - for git integration.
- Snacks - Various, including LazyGit
- TeleScope - for fuzzy finder.
- Trouble - for quickfix list.
- Todo Comments - for todo comments colouring and highlights.
- Mini.nvim - for statusline, autotags, icons, colour highlights, indent scope, cursorword, pairs
- Colorizer - for colouring tailwind colours.
- TS Autotag - for autotags in html and jsx.
- Live Preview - for live preview of markdown and html files.
- Yazi - Yazi for neovim. Requires Yazi
I've included a custom, modular approach to loading lagnuage servers, formatters, and linters into lsp config, conform, and nvim lint. To add your own languages, simply:
- Create a new lua file for the language in
nvim/lua/config/languages
- Each language file should return a function.
- In the function, call these globals:
sennvim.lsp.add_config
to add an lsp server and configsennvim.formatters.add_formatter
to add a formattersennvim.linters.add_linter
to add a linter.
- These files will be automatically detected, loaded, and installed via Mason on the next load.
The signature for lsp.add_config
is:
-- server_name: string
-- config: table
sennvim.lsp.add_config(server_name, config)
Signatures for linters and formatters are:
-- language: string
-- linters / formatter : table
sennvim.linters.add_linter(language, linters)
sennvim.formatters.add_formatter(language, formatter)
Linter and Formatter tables can contain multiple linters and formatters.
For example, here is the Python language file:
return function()
sennvim.lsp.add_config("basedpyright", {
settings = {
basedpyright = {
typeCheckingMode = "basic",
autoImportCompletions = true,
disableOrganizeImports = true,
},
},
})
sennvim.lsp.add_config("ruff", {
init_options = {
settings = {
configuration = "~/.config/ruff/ruff.toml",
logLevel = "debug",
},
},
})
end
or TypeScript:
return function()
local inlay_hints = {
includeInlayEnumMemberValueHints = true,
includeInlayFunctionLikeReturnTypeHints = true,
includeInlayFunctionParameterTypeHints = true,
includeInlayParameterNameHints = "all",
includeInlayParameterNameHintsWhenArgumentMatchesName = true,
includeInlayPropertyDeclarationTypeHints = true,
includeInlayVariableTypeHints = true,
includeInlayVariableTypeHintsWhenTypeMatchesName = true,
}
local ts_settings = {
settings = {
maxTsServerMemory = 12288,
typescript = {
inlayHints = inlay_hints,
},
javascript = {
inlayHints = inlay_hints,
},
},
}
sennvim.lsp.add_config("ts_ls", ts_settings)
sennvim.formatters.add_formatter("typescript", { "biome" })
sennvim.formatters.add_formatter("typescriptreact", { "biome" })
sennvim.formatters.add_formatter("javascript", { "biome" })
sennvim.formatters.add_formatter("javascriptreact", { "biome" })
sennvim.formatters.add_formatter_config("biome", { prepend_args = { "check", "--unsafe", "--write" } })
sennvim.linters.add_linter("typescript", { "biome", "eslint_d" })
sennvim.linters.add_linter("javascrypt", { "biome", "eslint_d" })
sennvim.linters.add_linter("typescriptreact", { "biome", "eslint_d" })
sennvim.linters.add_linter("javacriptreact", { "biome", "eslint_d" })
end
Note: there is also a global sennvim.formatters.add_formatter_config
available if you need to add additional args to the format command. You can see this in use in the TypeScript example above.
shift + up
/shift + down
- Move selected text up and down.
leader bn
Switch to next buffer.leader bp
Switch to previous buffer.leader bd
Close all buffers apart from the current buffer.leader bx
Close the current buffer.
leader gg
Open Lazygit. Press?
for help and keybindings.leader ls
Toggle live preview for markdown and html files.leader ee
Open Yazy. Yazi keybindings. See Yazi Documentationleader ff
Open fuzzy finderleader xx
Open diagnostics listleader fg
Open live grepleader fb
Open currently opened buffers.leader fh
Search help files.leader fx
Search in nvim config files for quick adjustments.
leader cd
Go to code definition.leader ch
View hover info ("K" also works).leader ci
Go to implementation.leader cr
Show references.leader cn
Rename symbol under cursor.leader ca
View code actionsleader cf
Format current fileleader ce
Open diagnostics list
- Include dap & dap loaders.
I welcome the idea that someone might find this useful and want to contribute. If you have any ideas, suggestions, or improvements, please feel free to open an issue or a pull request.