updated lsp, linting and formatters nvim
This commit is contained in:
1
Splitkeyboard/split_symbols.vil
Normal file
1
Splitkeyboard/split_symbols.vil
Normal file
File diff suppressed because one or more lines are too long
@@ -37,7 +37,6 @@ monitor=,preferred,auto,1.5
|
||||
|
||||
# Set programs that you use
|
||||
$terminal = kitty
|
||||
$fileManager = dolphin
|
||||
$menu = wofi --show drun
|
||||
$browser = librewolf
|
||||
$mail = betterbird
|
||||
@@ -227,7 +226,6 @@ $mainMod = SUPER # Sets "Windows" key as main modifier
|
||||
bind = $mainMod, return, exec, $terminal
|
||||
bind = $SUPER_SHIFT, c, killactive,
|
||||
bind = $mainMod, !, exit,
|
||||
bind = $mainMod, E, exec, $fileManager
|
||||
bind = $mainMod, V, togglefloating,
|
||||
bind = $mainMod, space, exec, $menu
|
||||
bind = $mainMod, P, exec, [workspace 5 silent] bitwarden-desktop
|
||||
@@ -339,7 +337,7 @@ bindl = , XF86AudioPrev, exec, playerctl previous
|
||||
# windowrulev2 = float,class:^(kitty)$,title:^(kitty)$
|
||||
|
||||
# Ignore maximize requests from apps. You'll probably like this.
|
||||
windowrulev2 = suppressevent maximize, class:.*
|
||||
# windowrulev2 = suppressevent maximize, class:.*
|
||||
|
||||
# Fix some dragging issues with XWayland
|
||||
#windowrulev2 = nofocus,class:^$,title:^$,xwayland:1,floating:1,fullscreen:0,pinned:0
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
"cmp-path": { "branch": "main", "commit": "c642487086dbd9a93160e1679a1327be111cbc25" },
|
||||
"cmp-tabnine": { "branch": "main", "commit": "c0167cdc86c15e782c5461ee62aebee89231c2ed" },
|
||||
"cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" },
|
||||
"conform.nvim": { "branch": "master", "commit": "328c2f1dda56f933d3337a1316e1020ba30ba6aa" },
|
||||
"diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" },
|
||||
"dressing.nvim": { "branch": "master", "commit": "2d7c2db2507fa3c4956142ee607431ddb2828639" },
|
||||
"flash.nvim": { "branch": "main", "commit": "fcea7ff883235d9024dc41e638f164a450c14ca2" },
|
||||
@@ -24,14 +25,15 @@
|
||||
"lualine.nvim": { "branch": "master", "commit": "47f91c416daef12db467145e16bed5bbfe00add8" },
|
||||
"luvit-meta": { "branch": "main", "commit": "0ea4ff636c5bb559ffa78108561d0976f4de9682" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "3b3571b4dadbcb464804466e9872e7246c316af7" },
|
||||
"mason-tool-installer.nvim": { "branch": "main", "commit": "517ef5994ef9d6b738322664d5fdd948f0fdeb46" },
|
||||
"mason.nvim": { "branch": "main", "commit": "57e5a8addb8c71fb063ee4acda466c7cf6ad2800" },
|
||||
"neo-tree.nvim": { "branch": "v3.x", "commit": "f3df514fff2bdd4318127c40470984137f87b62e" },
|
||||
"neogit": { "branch": "master", "commit": "d8bf9102692250193b855acd9025a826f1af2729" },
|
||||
"noice.nvim": { "branch": "main", "commit": "7bfd942445fb63089b59f97ca487d605e715f155" },
|
||||
"none-ls.nvim": { "branch": "main", "commit": "5abf61927023ea83031753504adb19630ba80eef" },
|
||||
"nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" },
|
||||
"nvim-autopairs": { "branch": "master", "commit": "c2a0dd0d931d0fb07665e1fedb1ea688da3b80b4" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "d97d85e01339f01b842e6ec1502f639b080cb0fc" },
|
||||
"nvim-lint": { "branch": "master", "commit": "7a64f4067065c16a355d40d0d599b8ca6b25de6d" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "c4f67bf85b01a57e3c130352c0a0e453ab8cd5b9" },
|
||||
"nvim-navic": { "branch": "master", "commit": "7d914a39a1ef8f4e22c2c4381abeef7c556f5a13" },
|
||||
"nvim-notify": { "branch": "master", "commit": "8701bece920b38ea289b457f902e2ad184131a5d" },
|
||||
@@ -43,7 +45,6 @@
|
||||
"obsidian.nvim": { "branch": "main", "commit": "ae1f76a75c7ce36866e1d9342a8f6f5b9c2caf9b" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
|
||||
"portal.nvim": { "branch": "main", "commit": "77d9d53fec945bfa407d5fd7120f1b4f117450ed" },
|
||||
"projections.nvim": { "branch": "main", "commit": "f18a8505f84f45a0fe024cafca5b969447f63cd5" },
|
||||
"telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },
|
||||
"telescope.nvim": { "branch": "master", "commit": "3d757e586ff0bfc85bdb7b46c9d3d932147a0cde" },
|
||||
"trouble.nvim": { "branch": "main", "commit": "bd67efe408d4816e25e8491cc5ad4088e708a69a" },
|
||||
|
||||
24
nvim/.config/nvim/lua/plugins.inactive/none-ls.lua
Normal file
24
nvim/.config/nvim/lua/plugins.inactive/none-ls.lua
Normal file
@@ -0,0 +1,24 @@
|
||||
return {
|
||||
"nvimtools/none-ls.nvim",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
},
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
config = function()
|
||||
local null_ls = require("null-ls")
|
||||
null_ls.setup({
|
||||
sources = {
|
||||
null_ls.builtins.formatting.stylua,
|
||||
null_ls.builtins.formatting.prettier,
|
||||
-- null_ls.builtins.diagnostics.eslint_d,
|
||||
null_ls.builtins.diagnostics.rubocop,
|
||||
null_ls.builtins.formatting.rubocop,
|
||||
null_ls.builtins.formatting.black,
|
||||
null_ls.builtins.formatting.isort,
|
||||
null_ls.builtins.diagnostics.pylint,
|
||||
null_ls.builtins.formatting.beautysh,
|
||||
},
|
||||
})
|
||||
vim.keymap.set("n", "<leader>gf", vim.lsp.buf.format, {})
|
||||
end,
|
||||
}
|
||||
@@ -1,3 +1,5 @@
|
||||
-- This is a VS Code like winbar that uses nvim-navic in order to get LSP context from your language server.
|
||||
|
||||
return {
|
||||
{
|
||||
"utilyre/barbecue.nvim",
|
||||
|
||||
79
nvim/.config/nvim/lua/plugins/conform.lua
Normal file
79
nvim/.config/nvim/lua/plugins/conform.lua
Normal file
@@ -0,0 +1,79 @@
|
||||
return {
|
||||
{
|
||||
"stevearc/conform.nvim",
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
config = function()
|
||||
require("conform").setup({
|
||||
formatters_by_ft = {
|
||||
-- Lua
|
||||
lua = { "stylua" },
|
||||
|
||||
-- JavaScript/TypeScript/Web
|
||||
javascript = { "prettier" },
|
||||
typescript = { "prettier" },
|
||||
javascriptreact = { "prettier" },
|
||||
typescriptreact = { "prettier" },
|
||||
vue = { "prettier" },
|
||||
css = { "prettier" },
|
||||
scss = { "prettier" },
|
||||
less = { "prettier" },
|
||||
html = { "prettier" },
|
||||
json = { "prettier" },
|
||||
jsonc = { "prettier" },
|
||||
yaml = { "prettier" },
|
||||
markdown = { "prettier" },
|
||||
graphql = { "prettier" },
|
||||
handlebars = { "prettier" },
|
||||
|
||||
-- Ruby
|
||||
ruby = { "rubocop" },
|
||||
|
||||
-- Python (black first, then isort for imports)
|
||||
python = { "black", "isort" },
|
||||
|
||||
-- Bash/Shell
|
||||
sh = { "beautysh" },
|
||||
bash = { "beautysh" },
|
||||
zsh = { "beautysh" },
|
||||
},
|
||||
|
||||
-- Format on save
|
||||
format_on_save = {
|
||||
timeout_ms = 500,
|
||||
lsp_fallback = true,
|
||||
},
|
||||
|
||||
-- Formatter settings
|
||||
formatters = {
|
||||
stylua = {
|
||||
prepend_args = { "--indent-type", "Spaces", "--indent-width", "2" },
|
||||
},
|
||||
prettier = {
|
||||
prepend_args = { "--tab-width", "2" },
|
||||
},
|
||||
beautysh = {
|
||||
prepend_args = { "--indent-size", "2" }, -- 2 spaces for bash
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
-- Manual format keymap (same as your old <leader>gf)
|
||||
vim.keymap.set("n", "<leader>gf", function()
|
||||
require("conform").format({
|
||||
lsp_fallback = true,
|
||||
async = false,
|
||||
timeout_ms = 1000,
|
||||
})
|
||||
end, { desc = "Format buffer" })
|
||||
|
||||
-- Optional: format on visual selection
|
||||
vim.keymap.set("v", "<leader>gf", function()
|
||||
require("conform").format({
|
||||
lsp_fallback = true,
|
||||
async = false,
|
||||
timeout_ms = 1000,
|
||||
})
|
||||
end, { desc = "Format selection" })
|
||||
end,
|
||||
},
|
||||
}
|
||||
@@ -44,6 +44,16 @@ return {
|
||||
},
|
||||
},
|
||||
pyright = {},
|
||||
|
||||
bashls = {
|
||||
filetypes = { "sh", "bash", "zsh" },
|
||||
settings = {
|
||||
bashIde = {
|
||||
globPattern = "*@(.sh|.inc|.bash|.command|.zsh)",
|
||||
shellcheckPath = "shellcheck",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
-- Setup each server with the new API
|
||||
|
||||
36
nvim/.config/nvim/lua/plugins/mason.lua
Normal file
36
nvim/.config/nvim/lua/plugins/mason.lua
Normal file
@@ -0,0 +1,36 @@
|
||||
return {
|
||||
{
|
||||
"WhoIsSethDaniel/mason-tool-installer.nvim",
|
||||
dependencies = { "williamboman/mason.nvim" },
|
||||
opts = {
|
||||
ensure_installed = {
|
||||
-- Formatters (you already have these)
|
||||
"stylua",
|
||||
"prettier",
|
||||
"rubocop",
|
||||
"black",
|
||||
"isort",
|
||||
"beautysh",
|
||||
|
||||
-- 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",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
return {
|
||||
"nvimtools/none-ls.nvim",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
},
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
config = function()
|
||||
local null_ls = require("null-ls")
|
||||
null_ls.setup({
|
||||
sources = {
|
||||
null_ls.builtins.formatting.stylua,
|
||||
null_ls.builtins.formatting.prettier,
|
||||
-- null_ls.builtins.diagnostics.eslint_d,
|
||||
null_ls.builtins.diagnostics.rubocop,
|
||||
null_ls.builtins.formatting.rubocop,
|
||||
null_ls.builtins.formatting.black,
|
||||
null_ls.builtins.formatting.isort,
|
||||
null_ls.builtins.diagnostics.pylint,
|
||||
},
|
||||
})
|
||||
vim.keymap.set("n", "<leader>gf", vim.lsp.buf.format, {})
|
||||
end,
|
||||
}
|
||||
65
nvim/.config/nvim/lua/plugins/nvim-lint.lua
Normal file
65
nvim/.config/nvim/lua/plugins/nvim-lint.lua
Normal file
@@ -0,0 +1,65 @@
|
||||
return {
|
||||
{
|
||||
"mfussenegger/nvim-lint",
|
||||
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" },
|
||||
|
||||
-- JSON
|
||||
json = { "jsonlint" },
|
||||
jsonc = { "jsonlint" },
|
||||
|
||||
-- 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()
|
||||
end, { desc = "Trigger linting" })
|
||||
end,
|
||||
},
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
return {
|
||||
{
|
||||
"gnikdroy/projections.nvim",
|
||||
dependencies = {
|
||||
"nvim-telescope/telescope.nvim",
|
||||
},
|
||||
config = function()
|
||||
require("projections").setup({
|
||||
workspaces = {
|
||||
"~/projects",
|
||||
"~/obsidian",
|
||||
"~/.config",
|
||||
},
|
||||
patterns = { ".git", "package.json", "Cargo.toml", "go.mod" },
|
||||
})
|
||||
|
||||
require("telescope").load_extension("projections")
|
||||
|
||||
-- Auto-store session on VimExit
|
||||
local Session = require("projections.session")
|
||||
vim.api.nvim_create_autocmd({ "VimLeavePre" }, {
|
||||
callback = function() Session.store(vim.loop.cwd()) end,
|
||||
})
|
||||
|
||||
-- Auto-restore session
|
||||
vim.api.nvim_create_autocmd({ "VimEnter" }, {
|
||||
callback = function()
|
||||
if vim.fn.argc() == 0 then
|
||||
Session.restore(vim.loop.cwd())
|
||||
end
|
||||
end,
|
||||
})
|
||||
end,
|
||||
keys = {
|
||||
{ "<leader>fp", "<cmd>Telescope projections<cr>", desc = "Find Projects" },
|
||||
},
|
||||
},
|
||||
}
|
||||
0
scripts/scripts/README.md
Normal file
0
scripts/scripts/README.md
Normal file
@@ -9,29 +9,29 @@ mkdir -p "$SHADER_DIR"
|
||||
|
||||
# Check if shader file exists, if not create with default values
|
||||
if [ ! -f "$SHADER_FILE" ]; then
|
||||
CURRENT_BRIGHTNESS=1.0
|
||||
BLUELIGHT_ENABLED=false
|
||||
CURRENT_BRIGHTNESS=1.0
|
||||
BLUELIGHT_ENABLED=false
|
||||
else
|
||||
# Get current brightness multiplier
|
||||
CURRENT_BRIGHTNESS=$(grep -oP 'pixColor.rgb \*= \K[0-9.]+' "$SHADER_FILE" | tail -1)
|
||||
# Get current brightness multiplier
|
||||
CURRENT_BRIGHTNESS=$(grep -oP 'pixColor.rgb \*= \K[0-9.]+' "$SHADER_FILE" | tail -1)
|
||||
|
||||
# Check current state by looking at the blue channel multiplier
|
||||
if grep -q "pixColor.b \*= 0.6" "$SHADER_FILE"; then
|
||||
BLUELIGHT_ENABLED=true
|
||||
else
|
||||
BLUELIGHT_ENABLED=false
|
||||
fi
|
||||
# Check current state by looking at the blue channel multiplier
|
||||
if grep -q "pixColor.b \*= 0.6" "$SHADER_FILE"; then
|
||||
BLUELIGHT_ENABLED=true
|
||||
else
|
||||
BLUELIGHT_ENABLED=false
|
||||
fi
|
||||
fi
|
||||
|
||||
# Toggle the blue light filter state
|
||||
if [ "$BLUELIGHT_ENABLED" = true ]; then
|
||||
# Filter is ON, turn it OFF
|
||||
NEW_STATE=false
|
||||
echo "Blue light filter: OFF"
|
||||
# Filter is ON, turn it OFF
|
||||
NEW_STATE=false
|
||||
echo "Blue light filter: OFF"
|
||||
else
|
||||
# Filter is OFF, turn it ON
|
||||
NEW_STATE=true
|
||||
echo "Blue light filter: ON"
|
||||
# Filter is OFF, turn it ON
|
||||
NEW_STATE=true
|
||||
echo "Blue light filter: ON"
|
||||
fi
|
||||
|
||||
# Recreate the shader file
|
||||
@@ -50,7 +50,7 @@ void main() {
|
||||
EOF
|
||||
|
||||
if [ "$NEW_STATE" = true ]; then
|
||||
cat >> "$SHADER_FILE" << EOF
|
||||
cat >> "$SHADER_FILE" << EOF
|
||||
// Reduce blue light
|
||||
pixColor.r *= 1.0;
|
||||
pixColor.g *= 0.85;
|
||||
@@ -69,6 +69,6 @@ EOF
|
||||
|
||||
# Apply shader
|
||||
if [ -z "$HYPRLAND_INSTANCE_SIGNATURE" ]; then
|
||||
export HYPRLAND_INSTANCE_SIGNATURE=$(ls -t /tmp/hypr/ 2>/dev/null | head -n1)
|
||||
export HYPRLAND_INSTANCE_SIGNATURE=$(ls -t /tmp/hypr/ 2>/dev/null | head -n1)
|
||||
fi
|
||||
/usr/bin/hyprctl keyword decoration:screen_shader "$SHADER_FILE"
|
||||
|
||||
@@ -2,7 +2,9 @@ tank /mnt/tank/ t
|
||||
ssd2 /mnt/ssd2/ 7
|
||||
ssd1 /mnt/ssd1/ 6
|
||||
plugins /home/liph/.config/nvim/lua/plugins/ p
|
||||
obsidian /home/liph/Documents/obsidian/vault/ o
|
||||
nvim /home/liph/.config/nvim/ n
|
||||
liph /home/liph/ l
|
||||
hypr /home/liph/.config/hypr/ h
|
||||
healing /mnt/tank/audio/healing/ H
|
||||
hdd5 /mnt/hdd5/ 5
|
||||
@@ -13,5 +15,4 @@ hdd1 /mnt/hdd1/ 1
|
||||
flash1 /mnt/flash1/ 8
|
||||
Downloads /home/liph/Downloads/ D
|
||||
dotfiles /home/liph/dotfiles/ d
|
||||
Desktop /home/liph/Desktop/ d
|
||||
.config /home/liph/.config/ c
|
||||
|
||||
Reference in New Issue
Block a user