Skip to content

🪶 Light and productive neovim configuration defaults

License

Notifications You must be signed in to change notification settings

mimiquate/nosvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

85 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🪶 nosvim

Light and productive.

A very thin config layer for neovim.

Motivation

Provide minimal defaults that enhance the native neovim experience significantly without too much bloat.

Intentionally try to avoid what could be noisy and distracting features.

For example:

  • Enable LSP diagnostics but only notify errors/warnings in the signcolumn and disable noisy red underline and virtual text.
  • Possible to manually :Gblame in buffer, but don't enable gitsigns blame info virtual text.

Main features

Prerequisites

  • Neovim 0.10+
  • tree-sitter-cli

Suggested and optional dependencies

To improve telescope.nvim finding and filtering experience:

More details on https://github.com/nvim-telescope/telescope.nvim?tab=readme-ov-file#suggested-dependencies

To make dev icons work:

What is a patched font in this context?

A font that has been patched/extended with icons.

Great video intro to Nerd Fonts by chris@machine.

Installation

# 0. Backup step in case any existing nvim config
$ mv ~/.config/nvim ~/.config/nvim-backup

# 1. Clone nosvim config files into your system nvim config root
$ git clone https://github.com/mimiquate/nosvim ~/.config/nvim

# 2. Open neovim and wait for lazy.nvim plugin manager to install plugins
$ nvim

You can, at any time, manually type :Lazy to open lazy.nvim dashboard on demand if necessary.

Update

$ cd ~/.config/nvim
$ git pull

Keymaps

We don't overwrite <Leader>. Defaults to the backslash (\) character.

On top of all the nvim default mappings we define the follwing:

Mode(s) Keymap Description Notes
normal <C-n> Open or close the file tree :NvimTreeToggle
normal <C-p> Search for files (respecting .gitignore) :Telescope find_files
normal <C-b> Lists open buffers in current neovim instance :Telescope buffers
normal <C-g> Search for a string and get results live as you type (respects .gitignore) :Telescope live_grep
normal gd Go to the definition of the symbol under the cursor :vim.lsp.buf.definition
normal
visual
<Space>f Formats a buffer (or visual selection) using the attached language server clients :vim.lsp.buf.format({ async = true })
normal <Space>e Show diagnostics in a floating window :vim.diagnostic.open_float
normal
visual
<C-Up> Move line(s) up
normal
visual
<C-Down> Move line(s) down
normal
visual
<Leader>c<Space> Comment or uncomment lines gcc
gc
insert <C-n> Invoke completion :cmp.complete

Support for programming languages

Syntax highlighting

Using nvim-treesitter commands:

# inside nvim

:TSInstall <language_to_install>

More details: https://github.com/nvim-treesitter/nvim-treesitter?tab=readme-ov-file#language-parsers.

Autocompletion and LSP

Using mason-nvim commands:

# inside nvim

:MasonInstall <language_to_install>

or

# inside nvim

:Mason

to open the interactive mason window.

More details: https://github.com/williamboman/mason.nvim?tab=readme-ov-file#commands.

Check installation health

# inside nvim
:checkhealth()

Extra customizations

Extra customizations and/or overrides can be placed under ~/.nvim.lua, which will be loaded automatically if present.

Plugins

To add a new plugin, you need to add a new file under ~/.config/nvim/lua/plugins/ according to lazy.nvim plugins spec specification.

See other existing files under that directory for examples on how to configure.

License

Copyright 2024 Mimiquate

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Releases

No releases published

Packages

No packages published

Languages