feat: Refactor neovim to a more modern stack. (#1)

Co-authored-by: Mariano Uvalle <u.g.a.mariano@gmail.com>
Reviewed-on: #1
This commit was merged in pull request #1.
This commit is contained in:
2026-09-25 19:52:00 +00:00
co-authored by Mariano Uvalle
parent 6cc9c8f5e3
commit da805e15c6
31 changed files with 248 additions and 1000 deletions
@@ -1,155 +1,89 @@
local execute = vim.api.nvim_command
local fn = vim.fn
local lazypath = vim.fn.stdpath('data') .. '/lazy/lazy.nvim'
if not vim.uv.fs_stat(lazypath) then
local output = vim.fn.system({
'git', 'clone', '--filter=blob:none', '--branch=stable',
'https://github.com/folke/lazy.nvim.git', lazypath,
})
if vim.v.shell_error ~= 0 then
error('Could not install lazy.nvim: ' .. output)
end
end
vim.opt.rtp:prepend(lazypath)
local install_path = fn.stdpath('data') .. '/site/pack/packer/start/packer.nvim'
if fn.empty(fn.glob(install_path)) > 0 then
fn.system({'git', 'clone', 'https://github.com/wbthomason/packer.nvim', install_path})
execute 'packadd packer.nvim'
-- Home Manager links the checked-in snapshot into the read-only Nix store.
-- Seed a writable lockfile once. After :Lazy update, copy the state lockfile
-- back to lazy-lock.json in this repo to commit reviewed plugin revisions.
local lockfile = vim.fn.stdpath('state') .. '/lazy-lock.json'
local snapshot = vim.fn.stdpath('config') .. '/lazy-lock.json'
if not vim.uv.fs_stat(lockfile) and vim.uv.fs_stat(snapshot) then
vim.fn.mkdir(vim.fn.fnamemodify(lockfile, ':h'), 'p')
vim.fn.writefile(vim.fn.readfile(snapshot), lockfile)
end
return require('packer').startup(function(use)
-- Packer can manage itself as an optional plugin
use 'wbthomason/packer.nvim'
require('lazy').setup({
-- LSP and completion
{ 'neovim/nvim-lspconfig', lazy = false },
{ 'hrsh7th/nvim-cmp', dependencies = {
'hrsh7th/cmp-nvim-lsp',
'hrsh7th/cmp-buffer',
'hrsh7th/cmp-path',
'dcampos/nvim-snippy',
'dcampos/cmp-snippy',
}, lazy = false },
-- LSP
use 'neovim/nvim-lspconfig'
use ({
'nvimdev/lspsaga.nvim',
config = function()
require('lspsaga').setup({})
end,
})
use {
'nvim-treesitter/nvim-treesitter',
run = ':TSUpdate'
}
-- Autocomplete
use 'hrsh7th/cmp-nvim-lsp'
use 'hrsh7th/cmp-buffer'
use 'https://codeberg.org/FelipeLema/cmp-async-path'
use 'dcampos/nvim-snippy'
use 'dcampos/cmp-snippy'
use 'hrsh7th/nvim-cmp'
-- Appearance and syntax
{ 'drewtempelmeyer/palenight.vim', lazy = false, priority = 1000 },
'nvim-tree/nvim-web-devicons',
'sheerun/vim-polyglot',
'https://codeberg.org/ziglang/zig.vim',
'styled-components/vim-styled-components',
'dominikduda/vim_current_word',
{ 'lukas-reineke/indent-blankline.nvim', main = 'ibl', ft = { 'yaml', 'helm' }, opts = {
scope = { enabled = false },
} },
'itchyny/lightline.vim',
'itchyny/vim-gitbranch',
{ 'tribela/transparent.nvim', opts = {} },
-- Function signatures
use "ray-x/lsp_signature.nvim"
-- Navigation and search
'airblade/vim-rooter',
{ 'nvim-telescope/telescope.nvim', tag = 'v0.1.9', dependencies = {
'nvim-lua/plenary.nvim',
'nvim-telescope/telescope-ui-select.nvim',
}, config = function()
require('nv-telescope')
end },
{ 'stevearc/oil.nvim', opts = {} },
{ 'MagicDuck/grug-far.nvim', opts = {} },
-- Theme
use 'drewtempelmeyer/palenight.vim'
use 'kyazdani42/nvim-web-devicons'
-- Syntax
use 'sheerun/vim-polyglot'
use 'https://codeberg.org/ziglang/zig.vim'
-- use {
--- 'prettier/vim-prettier',
-- run = "yarn install",
-- ft = {"javascript", "typescript", "json"}
-- }
use {'styled-components/vim-styled-components', branch = "main"}
use 'dominikduda/vim_current_word'
use {
'lukas-reineke/indent-blankline.nvim',
ft = {'yaml', 'yml', 'helm'},
config = function()
vim.opt.list = true
vim.opt.listchars:append("space:⋅")
vim.opt.listchars:append("eol:↴")
require("indent_blankline").setup {
show_end_of_line = true,
space_char_blankline = " ",
}
end
}
use 'airblade/vim-rooter'
-- Find tools.
use { "nvim-telescope/telescope-file-browser.nvim" }
use {'nvim-telescope/telescope-ui-select.nvim' }
use {
'nvim-telescope/telescope.nvim',
requires = {{'nvim-lua/popup.nvim'}, {'nvim-lua/plenary.nvim'}},
}
use { "junegunn/fzf" }
use { "junegunn/fzf.vim" }
use { "MagicDuck/grug-far.nvim" }
-- Diagnostics
-- Lua
use {
"folke/trouble.nvim",
requires = "kyazdani42/nvim-web-devicons",
config = function()
require("trouble").setup {
-- your configuration comes here
-- or leave it empty to use the default settings
}
end
}
-- Git symobls.
use {
'lewis6991/gitsigns.nvim',
tag = 'release',
config = function()
require('gitsigns').setup()
end
}
use 'jiangmiao/auto-pairs'
use 'itchyny/lightline.vim'
use 'itchyny/vim-gitbranch'
-- Golang
use 'fatih/vim-go'
-- Flutter/Dart
use {'akinsho/flutter-tools.nvim', requires = 'nvim-lua/plenary.nvim'}
-- Pyhton
-- use 'a-vrma/black-nvim'
use {
'psf/black', branch = "stable"
}
-- Ocaml
use {
"stevearc/conform.nvim",
config = function()
require("conform").setup({
formatters_by_ft = {
ocaml = { "ocamlformat" },
},
})
end,
}
use 'tpope/vim-commentary'
use 'tpope/vim-surround'
-- Smooth scrolling
use 'psliwka/vim-smoothie'
-- Yuck (Eww config language).
-- use 'elkowar/yuck.vim'
-- Better file viewer
use({
"stevearc/oil.nvim",
config = function()
require("oil").setup()
end,
})
use({
"tribela/transparent.nvim",
config = function()
require("transparent").setup({})
end,
})
end)
-- Diagnostics, Git, and editing
{ 'folke/trouble.nvim', opts = {} },
{ 'lewis6991/gitsigns.nvim', opts = {} },
'jiangmiao/auto-pairs',
{ 'fatih/vim-go', init = function()
vim.g.go_code_completion_enabled = 0
vim.g.go_gopls_enabled = 0
vim.g.go_fmt_command = 'gofmt'
vim.g.go_fmt_options = { gofmt = '-s' }
vim.g.go_imports_mode = 'goimports'
vim.g.go_doc_keywordprg_enabled = 0
vim.g.go_def_mapping_enabled = 0
vim.g.go_search_bin_path_first = 0
vim.g.go_template_use_pkg = 1
vim.g.go_highlight_operators = 1
vim.g.go_highlight_types = 1
vim.g.go_highlight_extra_types = 1
vim.g.go_highlight_functions = 1
vim.g.go_highlight_function_calls = 1
end },
{ 'stevearc/conform.nvim', opts = {
formatters_by_ft = { ocaml = { 'ocamlformat' } },
} },
'tpope/vim-commentary',
'tpope/vim-surround',
'psliwka/vim-smoothie',
}, {
lockfile = lockfile,
checker = { enabled = false },
change_detection = { notify = false },
})