My personal neovim config for Nix
Welcome to my Neovim configuration crafted for Nix. Feel free to use it as is or extract pieces to help construct your own unique setup.
Usage
To utilize this configuration, clone the repo and run the following command from the directory:
nix run .#
or
nix run github:gako358/neovim#.
Plugin Updates
nix flake update
nix flake lock --update-input 'Name-of-input'
Repository Structure
|-[modules] -- Contains modules which are used to configure neovim
|-flake.nix -- Flake file
|-README.md -- This file
Language Support
Most languages use nvim-lspconfig to set up language server. Additionally some languages also (or exclusively) use null-ls to extend capabilities.
C/C++
LSP Server: ccls
HTML
Plugins
- nvim-ts-autotag for autoclosing and renaming html tags. Works with html, tsx, vue, svelte, and php
Dhall
LSP Server: dhall-lsp-server
Haskell
LSP Server: haskell-language-server
Formatting: cabal-fmt
Java
** LSP Server**: jdtls
Formatting: java-google-formater
Nix
LSP Server: rnix-lsp
Formatting
rnix provides builtin formatting with nixpkgs-fmt but it is disabled and I am instead using null-ls with alejandra
Python
LSP Server: pyright
Formatting:
Using black through null-ls
Rust
LSP Server: rust-analyzer
Formatting
Rust analyzer provides builtin formatting with rustfmt
Plugins
Scala
LSP Server: metals
Typescript
LSP Server: typescript-language-server
Linting
Using eslint through null-ls.
Formatting
Disabled lsp server formatting, using prettier through null-ls.
Plugins
This configuration includes a variety of plugins designed to enhance your Neovim experience, from LSP and Autopairs, to Completions, Git, Themes, and more. For a complete list and description of all plugins:
LSP
- fidget-nvim Standalone UI for nvim-lsp progress. Eye candy for the impatient.
- nvim-lightbulb shows a lightbulb in the sign column whenever a codeAction is available.
- lsp-signature Show function signature when you type.
- nvim-lspconfig common configurations for built-in language server
- lspkind-nvim This tiny plugin adds vscode-like pictograms to neovim built-in lsp.
- lspsaga.nvim Neovim lsp enhance plugin.
- null-ls.nvim neovim as a language server to inject LSP diagnostics, code actions, etc.
- nvim-code-action-menu provides a handy pop-up menu for code actions
- trouble.nvim pretty list of lsp data
Autopairs
- nvim-autopairs an autopair plugin for neovim
ChatGPT
- ChatGPT.nvim a plugin for generating text with GPT-3.5 Turbo
Completions
- nvim-cmp a completion engine that utilizes sources (replaces nvim-compe)
- cmp-buffer a source for buffer words
- cmp-nvim-lsp a source for builtin LSP client
- cmp-vsnip a source for vim-vsnip autocomplete
- cmp-path a source for path autocomplete
- crates.nvim autocompletion of rust crate versions in
cargo.toml
Filetrees
- nvim-tree-lua a file explorer tree written in lua. Using
Git
- gitsigns.nvim a variety of git decorations
Snippets
- vim-vsnip a snippet plugin that supports LSP/VSCode's snippet format
Statuslines
- lualine.nvim statusline written in lua.
Terminal
- toggleterm.nvim a neovim plugin to persist and toggle multiple terminals during an editing session
Themes
- borealis a dark colorscheme with multiple options
Treesitter
- Nix installation of treesitter
- nvim-treesitter-context a context bar using tree-sitter
- nvim-ts-autotag uses treesitter to autoclose/rename html tags
Utilities
- telescope an extendable fuzzy finder of lists. Working ripgrep and fd
- which-key a popup that displays possible keybindings of command being typed
Visuals
- indent-blankline for indentation guides
- nvim-web-devicons Plugins and colors for icons. Requires patched font
Dependencies
- plenary which is a dependency of some plugins, installed automatically if needed
License
The files and scripts in this repository are licensed under the MIT License, which is a very permissive license allowing you to use, modify, copy, distribute, sell, give away, etc. the software. In other words, do what you want with it. The only requirement with the MIT License is that the license and copyright notice must be provided with the software.