Skip to content

uitdots/nvim

Repository files navigation

πŸ’« Neovim

A fast and highly customisable Neovim IDE with lazy loading, and modular configurations.

Heavy and bloated


πŸ“‘ ToC


πŸ“Έ Showcase

Dashboard Editor
Dashboard Editor
Debugging AI
Debugging AI

πŸ”₯ Supports

Plugins

  • Highly customisable plugin manager with lazy.nvim
  • Package manager with mason.nvim

    optional, you can disable this, and install package yourself

  • NvChad UI
  • Task runner, builtin file runner
  • Formatting, linting, debugging, testing
  • Querying database, rest api, json, yaml
  • AI integration with tab completion, MCP, VectorCode
  • Fast find files, image viewer with snacks.nvim
  • Others: translate, session, chezmoi, wakatime

Note

And much more...! You will get lost in this config.

Languages

Note

The higher the order, the better configured the language is

  • Author using:
    • javascript, typescript (nodejs, deno)

      deno: Install from mason or external yourself

    • go
    • python
    • sql (postgresql)
    • github (github_action)
    • gitlab
    • shell
    • docker
  • Others:
    • java
    • c, cpp
    • html
    • css
    • react
    • tailwind
    • c#/cs
    • flutter (dart)
    • vim
    • rust
    • kotlin
    • powershell
    • sql

      mssql: Haven't test

    • lua

      Just for configuring neovim :((

  • Ops:
    • groovy + jenkinsfile
    • hcl+ terraform
    • kubernetes
    • helm
    • nginx
    • ansible
  • Configuring languages:
    • toml
    • yaml
    • xml
    • config (sshconfig, tmux)
    • kmonad
  • Writing:
    • markdown
    • latex

Note

See lua/plugins/extras/languages/ for more detail


πŸ₯΄ Usage

Prerequisites

  • neovim:

    version >= 0.11

  • make: Some plugins require this
  • curl
  • delta
  • ripgrep: telescope, vimgrep replacement
  • fd: telescope
  • npm: for some plugins and stuff installed via Mason
  • go: Some stuff installed via Mason

Note

If you don't use mason, never mind those requirements from Mason

Install

# echo 'please star this repo!'
# sudo rm -rf /

Note

I suggest forking this repo in order to up to date with the upstream (this repo)

Warning

We all know how to do that

You shouldn't entering nvim for now. Use nvim --clean ./lua/plugins/extras/languages/init.lua or another editor to edit the lua/plugins/extras/languages/init.lua!!! Otherwise you will install tons of plugins and requirements from what I'm using.

Structure

lua
β”œβ”€β”€ configs                 Extendable settings for builtin, plugins options
β”‚   β”œβ”€β”€ dap                 nvim-dap config
β”‚   β”‚   └── ...
β”‚   β”œβ”€β”€ diagnostic          (Neo)vim diagnostic setup
β”‚   β”œβ”€β”€ lazy                lazy.nvim config
β”‚   β”œβ”€β”€ mason               Mason's config (custom registries)
β”‚   β”œβ”€β”€ lsp                 Neovim's lsp setting
β”‚   β”œβ”€β”€ runner              Builtin file runner
β”‚   └── ui                  UI (mostly for nvchad)
β”‚       └── ...
β”œβ”€β”€ core                    (Neo)vim native settings
β”œβ”€β”€ overseer                overseer.nvim templates
β”‚   └── template
β”‚       └── default
β”œβ”€β”€ plugins                 lazy.nvim plugins specs
β”‚   β”œβ”€β”€ extras              Plugins can be toggle
β”‚   β”‚   β”œβ”€β”€ ai              AI integration
β”‚   β”‚   β”œβ”€β”€ blink           blink.cmp extensions
β”‚   β”‚   β”œβ”€β”€ chezmoi         Chezmoi stuff
β”‚   β”‚   β”œβ”€β”€ coding          Package manager, lint, format
β”‚   β”‚   β”œβ”€β”€ dap             Debug
β”‚   β”‚   β”œβ”€β”€ database        Database
β”‚   β”‚   β”œβ”€β”€ git             Easier to interact with git
β”‚   β”‚   β”œβ”€β”€ languages       User's preference to enable
β”‚   β”‚   β”‚   └── ...
β”‚   β”‚   β”œβ”€β”€ lsp             Enhance LSP usage
β”‚   β”‚   β”œβ”€β”€ mason           Mason package manager
β”‚   β”‚   β”œβ”€β”€ motion          Extend neovim motions
β”‚   β”‚   β”œβ”€β”€ others          Others
β”‚   β”‚   β”œβ”€β”€ silly           When you are stress
β”‚   β”‚   β”œβ”€β”€ telescope       Telescope extensions
β”‚   β”‚   β”œβ”€β”€ test            Testing
β”‚   β”‚   β”œβ”€β”€ ui              Extend UI things
β”‚   └── main                Shouldn't disable, you don't want to break the config
β”œβ”€β”€ types                   Custom types, overriding types for lua annotating
└── utils                   Utilities

Note

Extra plugins in lua/plugins/extras are (may) safely disabled. You should disable by group in lua/plugins/extras/init.lua, lua/plugins/extras/languages/init.lua, and individually in lua/plugins/extras/others.


πŸ“’ Notes

Keymaps

There are some keymaps you should know in this config (and native neovim keymaps)

Note

Mode Keymap Descriptions
n <leader><leader> Find Files
n <leader>e Toggle File Tree
n <leader>Tab Open File Tree and Focus Current File
n <leader>y Yank all into System Clipboard
n H Navigate Left Buffer in NvChad Tabufline
n L Navigate Right Buffer in NvChad Tabufline
n <leader>c Close Buffer
n <leader><Esc> No Highlight Search Matches
n <C-s> Save Buffer
n ZZ Write Quit
n ZQ Quit
i <C-k> LSP Show Signature
n <C-w><C-d> LSP Float Diagnostic
n K LSP Hover Documentation
n <leader>at Toggle AI Completion Suggestion
n <leader>oH Uncloak The File laytan/cloak.nvim

Warning

With completion behavior, see questions below

Should read

  • Setting up new LSP in after/lsp/

    For better overriding

  • Use mason tools to install all packages (Language servers, linters, formatters, runtime)
    :MasonToolsInstall
  • Plugins are updated every week (set in lazy config)
  • Some languages pack require others, you should (or must?) enable yourself:
    • rest: http
    • jenkins: groovy
    • react: typescript
    • ansible: yaml (for yaml syntax highlighting)
  • Set $NVIM_NO_IDE to any value to disable lsp, format, lint (quick editing)

    Ex:

     NVIM_NO_IDE=1 lazygit # commit, quick edit
  • Working with sql:
    • Use compound filetype
    • Set the file type sql or plsql for treesitter highlighting, then the custom filetype after it (for linter and formatter attach to)

      Ex:

      • sql.postgresql, plsql.postgresql
      • # vim: set ft=sql.postgresql:
  • Working with latex:
    • on Arch:
      pacman -Sy texlive-latex texlive-latexextra texlive-binextra texlive-langother libxcrypt-compat
      pacman -S texlive-fontextra # For fonts...
    • other: idk
  • helm_ls includes yaml_ls already, no need to run yaml_ls
  • With groovy-language-server, ensure you are using java@18 or so...

For configuring

  • lazy.nvim only run config and init once. Not like opts
  • If NvChad UI's color is broken, use <leader>ur
  • Don't use NvChad's auto command
  • lsp currently not enabled by compound filetype
  • nvim-lint can lint the compound filetype
  • conform format the last filetype in the compound file, one by one

✏️ Others

Questions

Control space in Windows Terminal doesn't work

On windows terminal which cannot send Ctrl + Space into shell, you can send Ctrl + Space as Alt + ; by editing windows terminal config json (LocalState/settings.json):

{
  "actions": [
    {
      "command": {
        "action": "sendInput",
        "input": "\u001b;"
      },
      "id": "User.sendInput.63E68121",
      "keys": "ctrl+space"
    }
  ]
}

Change the behavior of completion

See https://cmp.saghen.dev/configuration/keymap.html and change lua/plugins/main/blink-cmp.lua. You should read all the docs.

Change the NvChad UI

It may be possible. But it may require times to config.

Tips & Tricks

References

About

uitvim :P (IDE)

Topics

Resources

License

Stars

Watchers

Forks

Languages