chore: more local tooling, fzf for nvim

This commit is contained in:
Vasili Svirydau
2026-05-28 09:26:26 -07:00
parent 85482e8c7b
commit 89d93bd0b4
5 changed files with 125 additions and 72 deletions
+5 -1
View File
@@ -10,6 +10,10 @@ rg = "latest"
starship = "latest" starship = "latest"
"npm:prettier" = "latest" "npm:prettier" = "latest"
"npm:typescript-language-server" = "latest" "npm:typescript-language-server" = "latest"
"npm:eslint" = "latest"
"npm:graphql-language-service-cli" = "latest"
"npm:bash-language-server" = "latest"
"npm:yaml-language-server" = "latest"
[env] [env]
RIPGREP_CONFIG_PATH = "{{ env.HOME }}/.ripgreprc" RIPGREP_CONFIG_PATH = "{{ env.HOME }}/.config/ripgrep/config"
+105 -71
View File
@@ -3,6 +3,9 @@ vim.o.signcolumn = "yes"
vim.o.winborder = "rounded" vim.o.winborder = "rounded"
vim.g.loaded_perl_provider = 0 vim.g.loaded_perl_provider = 0
vim.g.airline_powerline_fonts = 1 vim.g.airline_powerline_fonts = 1
vim.o.tabstop = 2
vim.o.shiftwidth = 2
vim.o.expandtab = true
vim.cmd([[set listchars=tab:▸\ ,eol:¬]]) vim.cmd([[set listchars=tab:▸\ ,eol:¬]])
@@ -18,30 +21,36 @@ vim.keymap.set("n", "<leader>d", ":bd<cr>")
vim.keymap.set("n", "<esc><esc>", "<esc>:nohlsearch<cr><esc>") vim.keymap.set("n", "<esc><esc>", "<esc>:nohlsearch<cr><esc>")
vim.keymap.set("n", "<space>", "zz") vim.keymap.set("n", "<space>", "zz")
vim.keymap.set("n", "<leader>w", ":update<cr>") vim.keymap.set("n", "<leader>w", ":update<cr>")
vim.keymap.set("n", "<c-p>", ":Pick files<cr>") vim.keymap.set("n", "<c-p>", function() FzfLua.files() end)
vim.keymap.set("n", "<leader>h", ":Pick help<cr>") vim.keymap.set("n", "<leader>h", ":Pick help<cr>")
vim.keymap.set("n", "<leader>cz", function() require("chezmoi.pick").mini() end) -- Pick from chezmoi managed files vim.keymap.set("n", "<leader>cz", function() require("chezmoi.pick").mini() end) -- Pick from chezmoi managed files
vim.pack.add( vim.pack.add(
{ {
{ src = "https://github.com/nvim-lua/plenary.nvim" }, -- Base functions library { src = "https://github.com/andythigpen/nvim-coverage" }, -- Code coverage visualuzer
{ src = "https://github.com/folke/lazydev.nvim" }, -- Lua Vim types { src = "https://github.com/folke/lazydev.nvim" }, -- Lua Vim types
{ src = "https://github.com/andythigpen/nvim-coverage" }, -- Code coverage visualuzer { src = "https://github.com/j-hui/fidget.nvim" }, -- LSP Status Popup
{ src = "https://github.com/nvim-mini/mini.icons" }, -- Icons for Ctrl-P {
{ src = "https://github.com/nvim-mini/mini.pick" }, -- Ctrl-P Alternative src = "https://github.com/kylechui/nvim-surround",
{ src = "https://github.com/nvim-mini/mini.extra" }, -- Additional things for mini tools version = vim.version.range("^4.0.0")
{ src = "https://github.com/lewis6991/gitsigns.nvim" }, -- Show git changes in the gutter }, -- Surround
{ src = "https://github.com/neovim/nvim-lspconfig" }, -- Common LSP Configurations { src = "https://github.com/lewis6991/gitsigns.nvim" }, -- Show git changes in the gutter
{ src = "https://github.com/sbdchd/neoformat" }, -- Formatter { src = "https://github.com/mfussenegger/nvim-lint" }, -- Linter
{ src = "https://github.com/tpope/vim-fugitive" }, -- Git bindings { src = "https://github.com/neovim/nvim-lspconfig" }, -- Common LSP Configurations
{ src = "https://github.com/vim-airline/vim-airline-themes" }, -- Status bar theme { src = "https://github.com/nvim-lua/plenary.nvim" }, -- Base functions library
{ src = "https://github.com/vim-airline/vim-airline" }, -- Status bar { src = "https://github.com/nvim-mini/mini.extra" }, -- Additional things for mini tools
{ src = "https://github.com/rebelot/kanagawa.nvim" }, -- Theme { src = "https://github.com/nvim-mini/mini.icons" }, -- Icons for Ctrl-P
{ src = "https://github.com/mfussenegger/nvim-lint" }, -- Linter { src = "https://github.com/nvim-mini/mini.pick" }, -- Ctrl-P Alternative
{ src = "https://github.com/rachartier/tiny-inline-diagnostic.nvim" }, -- Inline diagnostics { src = "https://github.com/rachartier/tiny-inline-diagnostic.nvim" }, -- Inline diagnostics
{ src = "https://github.com/j-hui/fidget.nvim" }, -- LSP Status Popup { src = "https://github.com/rebelot/kanagawa.nvim" }, -- Theme
{ src = "https://github.com/xvzc/chezmoi.nvim" }, -- Chezmoi dotfiles manager { src = "https://github.com/sbdchd/neoformat" }, -- Formatter
} { src = "https://github.com/tpope/vim-fugitive" }, -- Git bindings
{ src = "https://github.com/vim-airline/vim-airline-themes" }, -- Status bar theme
{ src = "https://github.com/vim-airline/vim-airline" }, -- Status bar
{ src = "https://github.com/xvzc/chezmoi.nvim" }, -- Chezmoi dotfiles manager
{ src = "https://github.com/esmuellert/nvim-eslint" }, -- Linter
{ src = "https://github.com/ibhagwan/fzf-lua" }, -- FZF Fuzzy Finder
}
) )
-- Airline -- Airline
@@ -53,38 +62,57 @@ let g:airline#extensions#tabline#enabled = 1
require("mini.pick").setup() require("mini.pick").setup()
require("mini.icons").setup() require("mini.icons").setup()
require("mini.extra").setup() require("mini.extra").setup()
require("fzf-lua").setup({ 'fzf-tmux' })
-- Coverage -- Coverage
require("coverage").setup() require("coverage").setup()
-- Lint -- Lint
require("lint").linters_by_ft = { require("lint").linters_by_ft = {
sh = { "shellcheck" } sh = { "shellcheck" }
} }
vim.api.nvim_create_autocmd({ "BufWritePost" }, { vim.api.nvim_create_autocmd({ "BufWritePost" }, {
callback = function() callback = function()
require("lint").try_lint() require("lint").try_lint()
end, end,
}) })
-- Theme -- Theme
vim.cmd.colorscheme "kanagawa-dragon" vim.cmd.colorscheme "kanagawa-dragon"
-- LSP -- LSP
vim.lsp.enable({ "lua_ls", "ts_ls", "bashls", "yamlls" }) vim.lsp.enable({ "lua_ls", "ts_ls", "bashls", "yamlls", "graphql" })
vim.lsp.config("lua_ls", { ---@type vim.lsp.Config
settings = { local lua_ls_config = {
Lua = { ---@type lspconfig.settings.lua_ls
workspace = { settings = {
library = vim.api.nvim_get_runtime_file("", true), Lua = {
} workspace = {
} library = vim.api.nvim_get_runtime_file("", true),
} }
}) }
-- Fidget }
require("fidget").setup {
} }
vim.lsp.config("lua_ls", lua_ls_config)
-- Autocomplete
vim.o.autocomplete = true
vim.api.nvim_create_autocmd('LspAttach', {
callback = function(ev)
local client = assert(vim.lsp.get_client_by_id(ev.data.client_id))
if client:supports_method('textDocument/completion') then
vim.lsp.completion.enable(true, client.id, ev.buf, { autotrigger = true })
end
vim.keymap.set('i', '<C-Space>', function()
vim.lsp.completion.get()
end, { buffer = ev.buf })
end,
})
vim.opt.complete:append("o")
vim.opt.completeopt = { 'menuone', 'noselect', 'fuzzy' }
-- Fidget
require("fidget").setup {}
-- Diagnostic -- Diagnostic
require('tiny-inline-diagnostic').setup() require('tiny-inline-diagnostic').setup()
@@ -92,38 +120,44 @@ vim.diagnostic.config({ virtual_text = false })
-- Chezmoi -- Chezmoi
require("chezmoi").setup { require("chezmoi").setup {
edit = { edit = {
watch = false, watch = false,
force = false, force = false,
ignore_patterns = { ignore_patterns = {
"run_onchange_.*", "run_onchange_.*",
"run_once_.*", "run_once_.*",
"%.chezmoiignore", "%.chezmoiignore",
"%.chezmoitemplate", "%.chezmoitemplate",
-- Add custom patterns here -- Add custom patterns here
}, },
}, },
events = { events = {
on_open = { on_open = {
notification = { notification = {
enable = true, enable = true,
msg = "Opened a chezmoi-managed file", msg = "Opened a chezmoi-managed file",
opts = {}, opts = {},
}, },
}, },
on_watch = { on_watch = {
notification = { notification = {
enable = true, enable = true,
msg = "This file will be automatically applied", msg = "This file will be automatically applied",
opts = {}, opts = {},
}, },
}, },
on_apply = { on_apply = {
notification = { notification = {
enable = true, enable = true,
msg = "Successfully applied", msg = "Successfully applied",
opts = {}, opts = {},
}, },
}, },
}, },
} }
-- Surround
require("nvim-surround").setup({})
-- Linter
require("nvim-eslint").setup({})
+13
View File
@@ -8,6 +8,10 @@
"rev": "889e2e96edef4e144965571d46f7a77bcc4d0ddf", "rev": "889e2e96edef4e144965571d46f7a77bcc4d0ddf",
"src": "https://github.com/j-hui/fidget.nvim" "src": "https://github.com/j-hui/fidget.nvim"
}, },
"fzf-lua": {
"rev": "fea9eedc6894c44d44cbb772a5cd11c93b82d7a1",
"src": "https://github.com/ibhagwan/fzf-lua"
},
"gitsigns.nvim": { "gitsigns.nvim": {
"rev": "dd3f588bacbeb041be6facf1742e42097f62165d", "rev": "dd3f588bacbeb041be6facf1742e42097f62165d",
"src": "https://github.com/lewis6991/gitsigns.nvim" "src": "https://github.com/lewis6991/gitsigns.nvim"
@@ -48,6 +52,10 @@
"rev": "a939e425e363319d952a6c35fb3f38b34041ded2", "rev": "a939e425e363319d952a6c35fb3f38b34041ded2",
"src": "https://github.com/andythigpen/nvim-coverage" "src": "https://github.com/andythigpen/nvim-coverage"
}, },
"nvim-eslint": {
"rev": "3c893af4152a417742e6ce96d9468b3f26359006",
"src": "https://github.com/esmuellert/nvim-eslint"
},
"nvim-java": { "nvim-java": {
"rev": "602a5f7fa92f9c1d425a2159133ff9de86842f0a", "rev": "602a5f7fa92f9c1d425a2159133ff9de86842f0a",
"src": "https://github.com/nvim-java/nvim-java" "src": "https://github.com/nvim-java/nvim-java"
@@ -76,6 +84,11 @@
"rev": "75e49cfa588a89ca667d767c0afef3ceac205faa", "rev": "75e49cfa588a89ca667d767c0afef3ceac205faa",
"src": "https://github.com/neovim/nvim-lspconfig" "src": "https://github.com/neovim/nvim-lspconfig"
}, },
"nvim-surround": {
"rev": "2e93e154de9ff326def6480a4358bfc149d5da2c",
"src": "https://github.com/kylechui/nvim-surround",
"version": "4.0.0 - 5.0.0"
},
"plenary.nvim": { "plenary.nvim": {
"rev": "74b06c6c75e4eeb3108ec01852001636d85a932b", "rev": "74b06c6c75e4eeb3108ec01852001636d85a932b",
"src": "https://github.com/nvim-lua/plenary.nvim" "src": "https://github.com/nvim-lua/plenary.nvim"
+2
View File
@@ -0,0 +1,2 @@
--hidden
--smart-case