added niri config with waybar, rip, nvim update, brightness sh

This commit is contained in:
liph22
2026-01-12 22:26:10 +01:00
parent d7b808ce59
commit c4df37dacb
38 changed files with 1801 additions and 414 deletions

View File

@@ -1,6 +1,7 @@
{
"Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" },
"LuaSnip": { "branch": "master", "commit": "fb525166ccc30296fb3457441eb979113de46b00" },
"R.nvim": { "branch": "main", "commit": "b7de6e6f43d79e31b077096ca0089fde85190f46" },
"barbecue": { "branch": "main", "commit": "cd7e7da622d68136e13721865b4d919efd6325ed" },
"catppuccin": { "branch": "main", "commit": "beaf41a30c26fd7d6c386d383155cbd65dd554cd" },
"cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" },
@@ -8,6 +9,7 @@
"cmp-nvim-lsp": { "branch": "main", "commit": "cbc7b02bb99fae35cb42f514762b89b5126651ef" },
"cmp-nvim-lua": { "branch": "main", "commit": "e3a22cb071eb9d6508a156306b102c45cd2d573d" },
"cmp-path": { "branch": "main", "commit": "c642487086dbd9a93160e1679a1327be111cbc25" },
"cmp-r": { "branch": "main", "commit": "70bfe8f4c062acc10266e24825439c009a0b1b89" },
"cmp-tabnine": { "branch": "main", "commit": "c0167cdc86c15e782c5461ee62aebee89231c2ed" },
"cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" },
"conform.nvim": { "branch": "master", "commit": "8314f4c9e205e7f30b62147069729f9a1227d8bf" },
@@ -16,8 +18,8 @@
"dressing.nvim": { "branch": "master", "commit": "2d7c2db2507fa3c4956142ee607431ddb2828639" },
"flash.nvim": { "branch": "main", "commit": "fcea7ff883235d9024dc41e638f164a450c14ca2" },
"friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" },
"fzf-lua": { "branch": "main", "commit": "a03d68e40eea835a1cdbd9f93049708dab3621e6" },
"gitsigns.nvim": { "branch": "main", "commit": "72acb69020c92d99cf388bfeb390481ccec50c04" },
"fzf-lua": { "branch": "main", "commit": "b8d1356b7120f5cf111709cb2fa504096248fb26" },
"gitsigns.nvim": { "branch": "main", "commit": "42d6aed4e94e0f0bbced16bbdcc42f57673bd75e" },
"grapple.nvim": { "branch": "main", "commit": "b41ddfc1c39f87f3d1799b99c2f0f1daa524c5f7" },
"harpoon": { "branch": "harpoon2", "commit": "87b1a3506211538f460786c23f98ec63ad9af4e5" },
"indent-blankline.nvim": { "branch": "master", "commit": "005b56001b2cb30bfa61b7986bc50657816ba4ba" },
@@ -25,7 +27,7 @@
"lazydev.nvim": { "branch": "main", "commit": "5231c62aa83c2f8dc8e7ba957aa77098cda1257d" },
"lualine.nvim": { "branch": "master", "commit": "47f91c416daef12db467145e16bed5bbfe00add8" },
"luvit-meta": { "branch": "main", "commit": "0ea4ff636c5bb559ffa78108561d0976f4de9682" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "e5f73a9e3d271d449685f1059eb1868f4ba276f6" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "fe661093f4b05136437b531e7f959af2a2ae66c8" },
"mason-tool-installer.nvim": { "branch": "main", "commit": "517ef5994ef9d6b738322664d5fdd948f0fdeb46" },
"mason.nvim": { "branch": "main", "commit": "44d1e90e1f66e077268191e3ee9d2ac97cc18e65" },
"neo-tree.nvim": { "branch": "v3.x", "commit": "f3df514fff2bdd4318127c40470984137f87b62e" },
@@ -35,7 +37,7 @@
"nvim-autopairs": { "branch": "master", "commit": "c2a0dd0d931d0fb07665e1fedb1ea688da3b80b4" },
"nvim-cmp": { "branch": "main", "commit": "85bbfad83f804f11688d1ab9486b459e699292d6" },
"nvim-lint": { "branch": "master", "commit": "ca6ea12daf0a4d92dc24c5c9ae22a1f0418ade37" },
"nvim-lspconfig": { "branch": "master", "commit": "5a82e10b2df0ed31bec642c1c0344baee7c458b6" },
"nvim-lspconfig": { "branch": "master", "commit": "92ee7d42320edfbb81f3cad851314ab197fa324a" },
"nvim-navic": { "branch": "master", "commit": "f5eba192f39b453675d115351808bd51276d9de5" },
"nvim-notify": { "branch": "master", "commit": "8701bece920b38ea289b457f902e2ad184131a5d" },
"nvim-spectre": { "branch": "master", "commit": "72f56f7585903cd7bf92c665351aa585e150af0f" },
@@ -54,8 +56,8 @@
"telescope.nvim": { "branch": "master", "commit": "3333a52ff548ba0a68af6d8da1e54f9cd96e9179" },
"trouble.nvim": { "branch": "main", "commit": "bd67efe408d4816e25e8491cc5ad4088e708a69a" },
"vim-test": { "branch": "master", "commit": "aa619692ff48a3cf3e6bdb893765039488d4e5f3" },
"vimtex": { "branch": "master", "commit": "1b56d5ae6e19cd018f1adaf4868561b087698b9b" },
"vimtex": { "branch": "master", "commit": "3abfa1ff75b81c01e4305e8062549ac0ea5cc9b8" },
"vimux": { "branch": "master", "commit": "614f0bb1fb598f97accdcea71d5f7b18d7d62436" },
"which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" },
"yazi.nvim": { "branch": "main", "commit": "30d8c852a0ca52437dad84cf5c92962d565a54a9" }
"yazi.nvim": { "branch": "main", "commit": "4a8bd3284708e11e48bcd865892902a46abdcce0" }
}

View File

@@ -0,0 +1,30 @@
-- plugins/mason.lua
return {
{
"williamboman/mason.nvim",
lazy = false,
config = function()
require("mason").setup()
end,
},
{
"williamboman/mason-lspconfig.nvim",
lazy = false,
opts = {
auto_install = true,
ensure_installed = {
"lua_ls",
"pyright",
"bashls",
"ts_ls",
"solargraph",
"html",
"texlab",
"ltex",
"dockerls",
"yamlls",
"taplo",
},
},
},
}

View File

@@ -7,7 +7,6 @@ return {
formatters_by_ft = {
-- Lua
lua = { "stylua" },
-- JavaScript/TypeScript/Web
javascript = { "prettier" },
typescript = { "prettier" },
@@ -24,32 +23,24 @@ return {
markdown = { "prettier" },
graphql = { "prettier" },
handlebars = { "prettier" },
-- Toml
toml = { "tombi" },
-- text
toml = { "taplo" }, -- Changed from tombi to taplo
-- Ruby
ruby = { "rubocop" },
-- latex
-- LaTeX
tex = { "tex-fmt" },
-- Python (black first, then isort for imports)
python = { "black", "isort" },
-- Python (ruff replaces black + isort)
python = { "ruff_format" }, -- Changed: consolidated to ruff
-- Bash/Shell
sh = { "beautysh" },
bash = { "beautysh" },
zsh = { "beautysh" },
sh = { "shfmt" }, -- Changed: using shfmt instead of beautysh
bash = { "shfmt" }, -- Changed: using shfmt instead of beautysh
zsh = { "beautysh" }, -- Keep beautysh for zsh
},
-- Format on save
format_on_save = {
timeout_ms = 500,
lsp_fallback = true,
},
-- Formatter settings
formatters = {
stylua = {
@@ -58,12 +49,14 @@ return {
prettier = {
prepend_args = { "--tab-width", "2" },
},
shfmt = {
prepend_args = { "-i", "2" }, -- 2 spaces for bash/sh
},
beautysh = {
prepend_args = { "--indent-size", "2" }, -- 2 spaces for bash
prepend_args = { "--indent-size", "2" }, -- 2 spaces for zsh
},
},
})
-- Manual format keymap (same as your old <leader>gf)
vim.keymap.set("n", "<leader>gf", function()
require("conform").format({
@@ -72,7 +65,6 @@ return {
timeout_ms = 1000,
})
end, { desc = "Format buffer" })
-- Optional: format on visual selection
vim.keymap.set("v", "<leader>gf", function()
require("conform").format({

View File

@@ -11,6 +11,19 @@ return {
lazy = false,
opts = {
auto_install = true,
ensure_installed = {
"lua_ls",
"pyright",
"bashls",
"ts_ls",
"solargraph",
"html",
"texlab",
"ltex",
"dockerls", -- Fixed: correct name
"yamlls", -- Fixed: correct name (not yaml-language-server)
"taplo", -- TOML LSP
},
},
},
{
@@ -22,17 +35,37 @@ return {
config = function()
local capabilities = require("cmp_nvim_lsp").default_capabilities()
local navic = require("nvim-navic")
-- local lspconfig = require("lspconfig")
-- Common on_attach function
local on_attach = function(client, bufnr)
if client.server_capabilities.documentSymbolProvider then
navic.attach(client, bufnr)
end
end
-- Define server configurations
local servers = {
ts_ls = {},
tombi = {},
solargraph = {},
ts_ls = {
capabilities = capabilities,
on_attach = on_attach,
},
taplo = {
capabilities = capabilities,
on_attach = on_attach,
},
solargraph = {
capabilities = capabilities,
on_attach = on_attach,
},
textlsp = {
filetypes = { "ltx", "txt" },
capabilities = capabilities,
on_attach = on_attach,
},
-- Add texlab for LaTeX
texlab = {
capabilities = capabilities,
on_attach = on_attach,
settings = {
texlab = {
build = {
@@ -41,7 +74,7 @@ return {
onSave = true,
},
forwardSearch = {
executable = "zathura", -- Change to your PDF viewer if different
executable = "zathura",
args = { "--synctex-forward", "%l:1:%f", "%p" },
},
chktex = {
@@ -51,17 +84,29 @@ return {
},
},
},
-- Optional: Add ltex for grammar/spell checking (can be resource-heavy)
ltex = {
capabilities = capabilities,
on_attach = on_attach,
filetypes = { "latex", "tex", "bib", "markdown" },
settings = {
ltex = {
language = "en-US", -- or "de-DE", "de-CH", etc.
language = "en-US",
enabled = { "latex", "tex", "bib" },
java = {
path = "",
initialHeapSize = 64,
maximumHeapSize = 512,
},
},
},
},
html = {},
html = {
capabilities = capabilities,
on_attach = on_attach,
},
lua_ls = {
capabilities = capabilities,
on_attach = on_attach,
settings = {
Lua = {
diagnostics = {
@@ -76,9 +121,14 @@ return {
},
},
},
pyright = {},
pyright = {
capabilities = capabilities,
on_attach = on_attach,
},
bashls = {
filetypes = { "sh", "bash", "zsh" },
capabilities = capabilities,
on_attach = on_attach,
settings = {
bashIde = {
globPattern = "*@(.sh|.inc|.bash|.command|.zsh)",
@@ -86,17 +136,26 @@ return {
},
},
},
dockerls = {
capabilities = capabilities,
on_attach = on_attach,
},
yamlls = {
capabilities = capabilities,
on_attach = on_attach,
settings = {
yaml = {
schemas = {
["https://json.schemastore.org/docker-compose.json"] = "docker-compose*.{yml,yaml}",
["https://json.schemastore.org/github-workflow.json"] = ".github/workflows/*",
},
},
},
},
}
-- Setup each server with the new API
-- Setup each server
for server, config in pairs(servers) do
config.capabilities = capabilities
-- Add navic on_attach for breadcrumbs
config.on_attach = function(client, bufnr)
if client.server_capabilities.documentSymbolProvider then
navic.attach(client, bufnr)
end
end
vim.lsp.config[server] = config
vim.lsp.enable(server)
end

View File

@@ -1,39 +0,0 @@
return {
{
"WhoIsSethDaniel/mason-tool-installer.nvim",
dependencies = { "williamboman/mason.nvim" },
opts = {
ensure_installed = {
-- Formatters (you already have these)
"luaformatter",
"prettier",
"rubocop",
"black",
"isort",
"beautysh",
"tombi",
"tex-fmt",
"texlab",
-- Linters (add these)
"ruff", -- Python (fast!)
"shellcheck", -- Bash
"jsonlint", -- JSON
"stylelint", -- CSS/SCSS
"htmlhint", -- HTML
"hadolint", -- Dockerfile
"eslint_d", -- JavaScript/TypeScript
"markdownlint", -- Markdown
-- LSP servers (optional)
"bash-language-server",
"dockerfile-language-server",
"ts_ls",
"solargraph",
"html",
"lua_ls",
"pyright",
},
},
},
}

View File

@@ -1,13 +1,13 @@
return {
"nvim-neo-tree/neo-tree.nvim",
branch = "v3.x",
dependencies = {
"nvim-lua/plenary.nvim",
"nvim-tree/nvim-web-devicons",
"MunifTanjim/nui.nvim",
},
config = function()
vim.keymap.set("n", "<leader>ee", ":Neotree filesystem reveal left<CR>", {})
vim.keymap.set("n", "<leader>bf", ":Neotree buffers reveal float<CR>", {})
end,
"nvim-neo-tree/neo-tree.nvim",
branch = "v3.x",
dependencies = {
"nvim-lua/plenary.nvim",
"nvim-tree/nvim-web-devicons",
"MunifTanjim/nui.nvim",
},
config = function()
vim.keymap.set("n", "<leader>ee", ":Neotree filesystem reveal left<CR>", {})
vim.keymap.set("n", "<leader>bf", ":Neotree buffers reveal float<CR>", {})
end,
}

View File

@@ -4,58 +4,48 @@ return {
event = { "BufReadPre", "BufNewFile" },
config = function()
local lint = require("lint")
lint.linters_by_ft = {
-- Python
python = { "ruff" }, -- Fast! Replaces pylint, flake8, isort
-- Alternative: python = { "pylint" },
-- Or combine: python = { "ruff", "mypy" }, -- ruff + type checking
-- Bash/Shell
sh = { "shellcheck" },
bash = { "shellcheck" },
zsh = { "shellcheck" },
zsh = { "zsh" },
-- JSON
json = { "jsonlint" },
jsonc = { "jsonlint" },
-- YAML (added for your compose files)
yaml = { "yamllint" },
-- CSS/SCSS
css = { "stylelint" },
scss = { "stylelint" },
sass = { "stylelint" },
less = { "stylelint" },
-- HTML
html = { "htmlhint" },
-- Alternative: html = { "tidy" },
-- Dockerfile (bonus)
dockerfile = { "hadolint" },
-- JavaScript/TypeScript (bonus)
javascript = { "eslint_d" },
typescript = { "eslint_d" },
javascriptreact = { "eslint_d" },
typescriptreact = { "eslint_d" },
-- Ruby (you already have this formatter)
ruby = { "rubocop" },
-- Markdown (bonus)
markdown = { "markdownlint" },
}
-- Auto-lint on save and when leaving insert mode
local lint_augroup = vim.api.nvim_create_augroup("lint", { clear = true })
vim.api.nvim_create_autocmd({ "BufEnter", "BufWritePost", "InsertLeave" }, {
group = lint_augroup,
callback = function()
lint.try_lint()
end,
})
-- Manual lint trigger
vim.keymap.set("n", "<leader>l", function()
lint.try_lint()

View File

@@ -0,0 +1,16 @@
return {
"R-nvim/R.nvim",
lazy = false, -- load immediately
config = function()
local opts = {
R_args = { "--quiet", "--no-save" },
min_editor_width = 72,
hl_term = true, -- Add this line for terminal highlighting
rconsole_width = 78,
}
require("r").setup(opts)
end,
dependencies = {
"R-nvim/cmp-r",
},
}

View File

@@ -18,6 +18,9 @@ return {
"lua",
"vim",
"latex",
"r",
"rnoweb", -- for Sweave files
"yaml", -- for YAML headers in Rmdkk
},
-- Auto install missing parsers

View File

@@ -3,6 +3,7 @@ vim.cmd("set tabstop=2")
vim.cmd("set softtabstop=2")
vim.cmd("set shiftwidth=2")
vim.g.mapleader = " "
vim.g.maplocalleader = ","
vim.g.background = "light"
vim.opt.swapfile = false