Add 'dots/' from commit 'f64b634dd8fbb2c8a2898c3b9d0acc9452e4d966'

git-subtree-dir: dots
git-subtree-mainline: 2ad98cde17
git-subtree-split: f64b634dd8
This commit is contained in:
2025-10-04 18:28:04 +02:00
232 changed files with 11175 additions and 0 deletions

View File

@@ -0,0 +1,10 @@
-- Source: <https://vonheikemen.github.io/devlog/tools/neovim-lsp-client-guide/>
vim.diagnostic.config({
signs = true,
underline = false,
severity_sort = true,
})
vim.keymap.set("n", "<leader>dl", vim.diagnostic.open_float)
vim.keymap.set("n", "<leader>dj", vim.diagnostic.goto_prev)
vim.keymap.set("n", "<leader>dk", vim.diagnostic.goto_next)

View File

@@ -0,0 +1,11 @@
vim.filetype.add({
filename = {
[".lintstagedrc"] = "json",
},
pattern = {
["tsconfig.*.json"] = "jsonc",
[".*/%.vscode/.*%.json"] = "jsonc",
[".*/%.ssh/config%.d/.*"] = "sshconfig",
["%.env.*"] = "dotenv",
},
})

View File

@@ -0,0 +1,14 @@
local autocmd = vim.api.nvim_create_autocmd
local augroup = vim.api.nvim_create_augroup
local function yank_highlight()
vim.highlight.on_yank({ higroup = "Visual", timeout = 150 })
end
-- Yanked text highlight feedback (source: https://github.com/nvim-lua/kickstart.nvim/blob/master/init.lua)
augroup("YankHighlight", { clear = true })
autocmd("TextYankPost", {
desc = "Highlight when yanking (copying) text",
group = "YankHighlight",
callback = yank_highlight,
})

View File

@@ -0,0 +1,13 @@
local set = vim.keymap.set
set("n", "<leader>cx", "<cmd>!chmod +x %<CR>", { silent = true, desc = "Run `chmod +x` on current file" })
set("n", "yp", "<cmd>let @+ = expand('%r')<CR>:p<CR>", { silent = true, desc = "Yank path" })
-- Remap native NeoVim comment keymaps
set({ "n", "x" }, "<leader>c", "gc", { remap = true, desc = "Toggle comment" })
set("n", "<leader>cc", "gcc", { remap = true, desc = "Toggle comment line" })
set("o", "<leader>c", "gc", { remap = true, desc = "Comment textobject" })
-- Move lines
set("v", "K", ": '<,'>move '<-2<cr>gv")
set("v", "J", ": '<,'>move '>+1<cr>gv")

View File

@@ -0,0 +1,80 @@
-- Automate paq installation {{{
local function clone_paq()
local path = vim.fn.stdpath("data") .. "/site/pack/paqs/start/paq-nvim"
local is_installed = vim.fn.empty(vim.fn.glob(path)) == 0
if not is_installed then
vim.fn.system({ "git", "clone", "--depth=1", "https://github.com/savq/paq-nvim.git", path })
return true
end
end
local function bootstrap_paq(packages)
local first_install = clone_paq()
vim.cmd.packadd("paq-nvim")
local paq = require("paq")
if first_install then
vim.notify("Installing plugins... If prompted, hit Enter to continue.")
end
paq(packages)
paq.install()
end
vim.api.nvim_create_autocmd("VimEnter", {
once = true,
callback = function()
local pkgs_count = #require("paq").query("to_install")
if pkgs_count < 1 then
return
end
vim.notify(string.format("There are %d to install", pkgs_count))
end,
})
-- }}}
-- Set up paq plugins {{{
bootstrap_paq({
{ "savq/paq-nvim" },
{ "jinh0/eyeliner.nvim" },
{ "ibhagwan/fzf-lua" },
{ "barreiroleo/ltex_extra.nvim" },
{ "neovim/nvim-lspconfig" },
{ "https://git.sr.ht/~whynothugo/lsp_lines.nvim" },
{ "linrongbin16/lsp-progress.nvim" },
{ "folke/neodev.nvim" }, -- Nvim
{ "b0o/schemastore.nvim" }, -- JSON Schemas
{ "mfussenegger/nvim-lint" },
{ "stevearc/conform.nvim" },
{ "L3MON4D3/LuaSnip" },
{ "saadparwaiz1/cmp_luasnip" },
{ "hrsh7th/nvim-cmp" },
{ "hrsh7th/cmp-nvim-lsp" },
{ "hrsh7th/cmp-buffer" },
{ "hrsh7th/cmp-path" },
{ "nvim-lua/plenary.nvim" },
{ "MunifTanjim/nui.nvim" },
{ "folke/trouble.nvim" },
{ "rktjmp/shipwright.nvim" }, -- For building themes based on lush (e.g. terminal)
{ "rktjmp/lush.nvim" },
{ "mcchrish/zenbones.nvim" }, -- Zenbones themes (contains zenwritten)
{ "theHamsta/crazy-node-movement" },
{ "nvim-treesitter/nvim-treesitter", build = ":TSUpdate" },
{ "nvim-treesitter/nvim-treesitter-textobjects" },
-- { "nvim-treesitter/nvim-treesitter-context" },
{ "JoosepAlviste/nvim-ts-context-commentstring" }, -- commentstring based on cursor position (e.g. for Svelte)
{ "Wansmer/treesj" },
{ "michaelb/sniprun", build = "sh install.sh" },
{ "lewis6991/gitsigns.nvim" },
{ "brenoprata10/nvim-highlight-colors" },
{ "razak17/tailwind-fold.nvim" },
{ "rmagatti/auto-session" },
{ "kndndrj/nvim-dbee" },
{ "3rd/image.nvim", build = false },
{ "polarmutex/beancount.nvim" },
{ "jamesblckwell/nvimkit.nvim" },
{ 'olimorris/codecompanion.nvim' },
{ "ravitemer/mcphub.nvim", build = "pnpm install -g mcp-hub@latest" },
{ "zbirenbaum/copilot.lua" },
{ "zbirenbaum/copilot-cmp" },
{ "qvalentin/helm-ls.nvim", ft = "helm" },
})
-- }}}

View File

@@ -0,0 +1,5 @@
vim.cmd([[
set runtimepath^=~/.vim runtimepath+=~/.vim/after
let &packpath = &runtimepath
source ~/.vimrc"
]])