rubiin / init.lua

My neovim config

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

πŸ’€ My neovim config

Based on LazyVim as a starter, though most stuffs are overridden to keep less dependency on LazyVim as possible. The one based on lunarvim can be found at my dotfiles repo but I wanted more barebones and minimal as a result of which this repo was born which was sooner or later bound to happen

init.lua/(Always WIP)

⚑ Requirements

  • Neovim >= 0.9.4 (needs to be built with LuaJIT)
  • Git >= 2.19.0 (for partial clones support)
  • a Nerd Font(v3.0 or greater) as your terminal font.

    Make sure the nerd font you set doesn't end with Mono to prevent small icons. Example : JetbrainsMono Nerd Font and not JetbrainsMono Nerd Font Mono

  • lazygit (optional) for git integration
  • a C compiler for nvim-treesitter. See here
  • for telescope.nvim (optional)
  • a terminal that support true color and undercurl:

You can also run the setup.sh if you are lazy and it will install all the requirements for you considering you are on a unix based system

Install Instructions

Install requires Neovim 0.9+. Always review the code before installing a configuration.

Clone the repository and install the plugins:

git clone git@github.com:rubiin/init.lua ~/.config/rubiin/init.lua
NVIM_APPNAME=rubiin/init.lua/ nvim --headless +"Lazy! sync" +qa```

Replace local plugins specs with the ones from the remote repository:
```~/personal-vim-plugs/xyz``` becomes  ```rubiin/xyz```


Open Neovim with this config:

```sh
NVIM_APPNAME=rubiin/init.lua/ nvim

Docker Instructions

docker run -w /root -it --rm alpine:latest sh -uelic '
  apk add git nodejs neovim ripgrep build-base wget --update
  git clone https://github.com/rubiin/init.lua ~/.config/nvim
  nvim
  '
  • NOTE for Windows users:
  • don't use Windows
  • try WSL2 on Windows and pretend you're on Linux (it's better)

Directory structure

β”œβ”€β”€ after
β”‚   └── ftplugin                         # Override filetype settings
β”œβ”€β”€ biome.json                           # Configuration file for a specific feature or plugin
β”œβ”€β”€ doc
β”‚   └── keymaps.md                       # Documentation file for keymaps
β”œβ”€β”€ init.lua                             # Initialization file for Vim or Neovim
β”œβ”€β”€ lazy-lock.json                       # Configuration file for a specific feature or plugin
β”œβ”€β”€ lazyvim.json                         # Configuration file for a specific feature or plugin
β”œβ”€β”€ LICENSE                              # File containing licensing information
β”œβ”€β”€ lua
β”‚   β”œβ”€β”€ config                           # Core configuration scripts
β”‚   β”œβ”€β”€ custom                           # Custom Lua scripts
β”‚   β”œβ”€β”€ plugins                          # Configurations for plugins
β”‚   β”‚   β”œβ”€β”€ coding
β”‚   β”‚   β”œβ”€β”€ disabled.lua
β”‚   β”‚   β”œβ”€β”€ editor
β”‚   β”‚   β”œβ”€β”€ extras
β”‚   β”‚   β”œβ”€β”€ init.lua
β”‚   β”‚   β”œβ”€β”€ lang
β”‚   β”‚   β”œβ”€β”€ lsp
β”‚   β”‚   └── ui
β”‚   └── utils                            # Utility scripts
β”œβ”€β”€ misc                                 # Misc folders
β”‚   β”œβ”€β”€ snippets
β”‚   └── undo
β”œβ”€β”€ README.md                            # Readme file for the project
β”œβ”€β”€ selene.toml                          # Possible configuration file for a tool or plugin
β”œβ”€β”€ setup.sh                             # Shell script for bootstrapping required tools
β”œβ”€β”€ spell                                # Directory possibly containing spellcheck related files
└── stylua.toml                          # Configuration file for Stylua

UI

Start screen with dashboard-nvim

dashboard

Editor

editor

Plugins

There are more plugins on extras folder that are not loaded by default. You can enable them by adding the require line on lua/plugins/init.lua. Some are disabled by default because they are not used by me but I keep them there for reference.

Personalization

You can customize the banner with the globals on lua/rubiin/globals.lua:

g.vscode_snippets_path = fn.stdpath("config") .. "/misc/snippets" -- Path to vscode snippets
g.github_username = "rubiin" -- Github username
g.random_banner = true -- Random banner
g.fortune = true -- Fortune in start screen
g.border_style = "single" ---@type "single"|"double"|"rounded"|"solid"|"none"

If you want to start neovim with no plugins whatsoever you can use the --clean flag. For example, if you want to use neovim as your git editor you can add this to your .gitconfig:

core.editor = nvim --clean

If anything is not working as expected, please open an issue.

Credits and Further reading/learning

About

My neovim config

License:Apache License 2.0


Languages

Language:Lua 94.7%Language:Vim Script 4.3%Language:Shell 0.9%Language:Scheme 0.1%Language:DIGITAL Command Language 0.0%