Skip to content

keirsalterego/nvim-config

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

My Neovim Configuration

This is my personal Neovim configuration, built on top of NvChad. It's tailored to my workflow with custom plugins, key mappings, and settings.

Features & Customizations

UI & Theme

  • Colorscheme: onedark (set in chadrc.lua)
  • NvChad UI: Inherits most settings from NvChad, with room for further customization.

Plugins

Your setup uses a modular approach for plugin management, leveraging NvChad's system and custom configurations in lua/plugins/ and lua/configs/. Here are the main plugins you have configured:

  • conform.nvim:
    A fast and focused formatter plugin for Neovim. Your configuration uses a custom setup from lua/configs/conform.lua.
    Format on save is available (commented in your config).

  • nvim-lspconfig:
    Quickstart configurations for the built-in LSP client. Your setup loads custom LSP server settings from lua/configs/lspconfig.lua.

Plugin Management

  • Lazy.nvim:
    Your plugin manager is configured in lua/configs/lazy.lua.
    • Plugins are lazy-loaded by default for performance.
    • The default colorscheme is set to "nvchad".
    • Several built-in or legacy Vim plugins are disabled for a leaner runtime.

(Optional/Commented Plugins)

  • nvim-treesitter:
    There's a commented-out example for Treesitter, which would provide advanced syntax highlighting and parsing for multiple languages.
  • nvchad.blink:
    There's a commented-out import for a custom blink plugin.

Language Servers & Tooling

Your configuration provides robust support for many languages, with a special focus on Rust, Python, Go, C/C++, and more. Here's how it works:

Mason: Automated Tool Management

  • Mason is used to automatically install and manage LSP servers, formatters, and linters.
  • Tools are specified in lua/configs/mason.lua under ensure_installed, including:
    • LSP Servers: rust-analyzer, pyright, gopls, clangd, lua-language-server, html-lsp, css-lsp, typescript-language-server, json-lsp, yaml-language-server, dockerfile-language-server, bash-language-server
    • Formatters: rustfmt, black, stylua, prettier, gofmt, clang-format
    • Linters: eslint_d, pylint, shellcheck

LSP Configuration

  • All major language servers are set up in lua/configs/lspconfig.lua with sensible defaults.
  • Rust (rust-analyzer):
    • Deep integration with advanced settings:
      • Enables all Cargo features, build scripts, and out directories.
      • Runs clippy on save for linting.
      • Enables procedural macros, with some ignored for performance.
    • This ensures a powerful, IDE-like experience for Rust development.
  • Python (pyright):
    • Configured for workspace-wide analysis and type checking.
  • Go (gopls):
    • Enables static analysis, formatting, and parameter checks.
  • C/C++ (clangd):
    • Uses UTF-16 offset encoding for compatibility.
  • Lua (lua_ls):
    • Tailored for Neovim development, with Neovim runtime and plugin libraries included for completion and diagnostics.

Example: Rust Analyzer Details

  • LSP: rust-analyzer is installed and managed by Mason.
  • Linting: Runs clippy automatically on save, with all features enabled.
  • Formatting: Uses rustfmt for code formatting.
  • Procedural Macros: Enabled for full macro support, with some common macros ignored for speed.

Other Supported Languages

  • JavaScript/TypeScript, HTML, CSS, JSON, YAML, Docker, Bash, and more, each with their own LSP, formatter, and linter as appropriate.

LSP, Formatting, and Tooling

  • LSP: Custom LSP settings and servers configured in lspconfig.lua.
  • Formatter: Conform.nvim is set up for code formatting.
  • Mason: Handles installation of LSP servers, DAP, linters, and formatters.

Key Mappings

Custom key mappings are defined in lua/mappings.lua:

  • ; in normal mode enters command mode (:).
  • jk in insert mode exits to normal mode (<ESC>).
  • (Commented out) <C-s> to save in normal, insert, and visual modes.

Neovim Options

  • Inherits most options from NvChad (require "nvchad.options").
  • Space for your own custom options (currently commented out).

Autocommands

  • Inherits autocommands from NvChad (require "nvchad.autocmds").
  • Space for your own custom autocommands.

Plugin Configurations

  • lua/configs/ contains specific plugin or feature configurations (details can be added if you want to highlight any particular plugin or setup).

Getting Started

  1. Clone this repo into your Neovim config directory:
    git clone <this-repo-url> ~/.config/nvim
  2. Install NvChad as the base.
  3. Open Neovim and let it install plugins automatically.

Credits

  • NvChad for the base config and plugin system.
  • LazyVim for inspiration.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages