badele / vide

Neovim custom configuration, oriented for DevOps role (bash, go, json, python, terraform, typescript, etc ...). not empty code :)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

vide logo

Welcome to my personalized Neovim configuration! This configuration is tailored primarily for DevOps tasks but can also be utilized by developers working with languages like Bash, Go, JSON, Python, Terraform, TypeScript, and more.

I've aimed to streamline the installation process by creating a installation script based on flake.nix

scripts for your preferred distributions (you can even test it on Docker images).

dashboard outline telescope git

Features

  • DevOps-Centric: This Neovim setup is optimized for DevOps workflows, enhancing your efficiency in tasks related to infrastructure, automation, and more.
  • Developer-Friendly: Even if you're a developer working with various programming languages such as Bash, Deno, Go, JSON, Nix, Python, Terraform, TypeScript, etc., this configuration has you covered.

Plugins

Language support

To add or remove a language, you need to modify the following files:

  • flake.nix
  • lua/config/options.lua
  • lua/plugins/code/conform.lua
  • lua/plugins/code/lspconfig.lua
  • lua/plugins/code/nvim-lint.lua
  • lua/plugins/code/treesitter.lua
  • lua/plugins/editor/filetype.lua

Language marketplace list:

The below table show the languages fully supporter (LSP, highlighting, format, lint/diagnostic, completion, action).

Fully supported

Language LSP HL FO Lint cmp CA Plugins
deno βœ… βœ… βœ… βœ… βœ… βœ… lspconfig (denols)
javascript βœ… βœ… βœ… βœ… βœ… βœ… lspconfig (denols)
dockerfile βœ… βœ… βœ… βœ… βœ… βœ… lspconfig (dockerls)
lua βœ… βœ… βœ… βœ… βœ… βœ… lspconfig (lua_ls)
markdown βœ… βœ… βœ… βœ… βœ… βœ… lspconfig (marksman), nvim-lint(markdownlint), conform(deno_fmt)
nix βœ… βœ… βœ… βœ… βœ… βœ… lspconfig (nixd, nil_ls)
openscad βœ… βœ… βœ… βœ… βœ… βœ… lspconfig (openscad-lsp)
python βœ… βœ… βœ… βœ… βœ… βœ… lspconfig (ruff_lsp)
scala βœ… βœ… βœ… βœ… βœ… βœ… lspconfig (metals)
shell βœ… βœ… βœ… βœ… βœ… βœ… lspconfig (bashls), conform(shellharden)
terraform βœ… βœ… βœ… βœ… βœ… βœ… lspconfig(terraform, terraform-ls
tex/latex βœ… βœ… βœ… βœ… βœ… βœ… vimtex, lspconfig(texlab)
typescript βœ… βœ… βœ… βœ… βœ… βœ… lspconfig (denols)
yaml βœ… βœ… βœ… βœ… βœ… βœ… lspconfig(yamlls)

Partily supported

Language LSP HL FO Lint cmp CA Plugins
ansible βœ… βœ… ❌ βœ… ❌ πŸ”³ ansiblels, ansible-lint
diagram πŸ”³ ❌ ❌ ❌ πŸ”³ πŸ”³ venn
docker-compose πŸ”³ πŸ”³ πŸ”³ πŸ”³ πŸ”³ πŸ”³ TODO
gnuplot πŸ”³ βœ… πŸ”³ πŸ”³ πŸ”³ πŸ”³ Use filetype.nvim type detection
go πŸ”³ πŸ”³ πŸ”³ πŸ”³ πŸ”³ πŸ”³ TODO
json βœ… βœ… βœ… βœ… πŸ”³ πŸ”³ lspconfig(jsonls), efm(fixjson)
justfile ❌ βœ… βœ… βœ… πŸ”³ πŸ”³ lspconfig(jsonls), efm(fixjson)
ledger ❌ βœ… ❌ ❌ ❌ ❌ vim-just
lua βœ… βœ… βœ… βœ… πŸ”³ πŸ”³ luacheck, selene, stylua
makefile πŸ”³ βœ… ❌ βœ… ❌ πŸ”³ checkmake
vim πŸ”³ πŸ”³ πŸ”³ πŸ”³ πŸ”³ πŸ”³ TODO

Legend : LSP-Language Server Protocol / HL-Highlight / FO-Format / CA-Code Action

keybinding

Main keybinding with <leader> key :

Key Category
c Code
f Find/File
g Goto
m Misc
s Search
t Table
u User
! Terminal

Try

You can use this configuration with neovim >= 0.8.0

If you need install some distribution dependencies use install/<distribname> script

Supported distributions list:

  • archlinux
  • debian
  • fedora
  • nixos
  • ubuntu

Try on docker image

git clone https://github.com/badele/vide.git ~/.config/vide
cd ~/.config/vide
make docker-run DISTRIB=<distribname>
make check
nvim

Try on your distribution with nix

Before installing vide in your distribution, you must install & configure nix.

1) Select nix installation

Distribution Installation command
archlinux pacman -S git nix
debian apt-get git nix
fedora dnf install git xz && manual nix installation
nixos no need installation
ubuntu apt-get git nix

Manual nix installation : curl -L https://nixos.org/nix/install | sh -s -- --daemon --yes

2) Configure nix

echo "extra-experimental-features = nix-command flakes" >> /etc/nix/nix.conf

Preserve your current nvim configuration

git clone https://github.com/badele/vide.git ~/.config/vide
cd ~/.config/vide
nix develop
make check
make try-nvim

Installation

Warning: That replace your current nvim configuration, your current configuration is backuped

mv ~/.config/nvim ~/.config/nvim.bak-$(date +%s)
git clone https://github.com/badele/vide.git ~/.config/nvim
cd ~/.config/nvim
nix develop
make check
nvim

Available commands

check          Check requirements installation
distrib-list   List supported distribution
docker-build   Build <DISTRIB> docker image
docker-run     Run <DISTRIB> docker image
help           This help
try-nvim       Try nvim without update your current nvim configuration

TODO

  • vide
    • Define lazy & event option for all plugins
    • Add markdown preview keybinding on <leader>mm or <leader>mp
  • search plugins for :
  • try
    • legendary.nvim
    • neorg
    • ALE
    • vimwiki
    • incline

Credits

Many snippets come from the following projects, thanks to the contributors of these projects

About

Neovim custom configuration, oriented for DevOps role (bash, go, json, python, terraform, typescript, etc ...). not empty code :)

License:GNU General Public License v3.0


Languages

Language:Lua 80.3%Language:Nix 10.4%Language:Shell 5.2%Language:Dockerfile 2.8%Language:Makefile 1.4%