dots

Mika's dotfiles
git clone git://popovic.xyz/dots.git/
Log | Files | Refs | README

commit 3d5af6248ce3e02d1467004853390421aebc38c9
parent 3c89e69cf5783bd754d3e6385133df5ac9de3745
Author: Milutin Popovic <milutin@popovic.xyz>
Date:   Sat, 14 Mar 2026 20:16:00 +0000

bump

Diffstat:
M.config/nvim/lua/plugins/lsp.lua | 318++++++++++++++++++++++++++++++++++++++++---------------------------------------
M.config/shell/profile | 1+
M.local/bin/scripts/trm | 5++---
M.local/share/applications/cal.desktop | 2+-
M.local/share/applications/file.desktop | 2+-
M.local/share/applications/gif.desktop | 2+-
M.local/share/applications/img.desktop | 2+-
M.local/share/applications/mail.desktop | 2+-
M.local/share/applications/pdf.desktop | 2+-
9 files changed, 170 insertions(+), 166 deletions(-)

diff --git a/.config/nvim/lua/plugins/lsp.lua b/.config/nvim/lua/plugins/lsp.lua @@ -1,165 +1,169 @@ return { - "neovim/nvim-lspconfig", - dependencies = { - "stevearc/conform.nvim", - "williamboman/mason.nvim", - "williamboman/mason-lspconfig.nvim", - "j-hui/fidget.nvim", - "hrsh7th/nvim-cmp", - "hrsh7th/cmp-nvim-lsp", - }, - config = function() - map = vim.keymap.set - vim.opt.signcolumn = "yes" - vim.lsp.inlay_hint.enable(true) + "neovim/nvim-lspconfig", + dependencies = { + "stevearc/conform.nvim", + "williamboman/mason.nvim", + "williamboman/mason-lspconfig.nvim", + "j-hui/fidget.nvim", + "hrsh7th/nvim-cmp", + "hrsh7th/cmp-nvim-lsp", + }, + config = function() + map = vim.keymap.set + vim.opt.signcolumn = "yes" + vim.lsp.inlay_hint.enable(true) - local lspconfig_defaults = require("lspconfig").util.default_config - require("conform").setup({ - formatters_by_ft = { - javascript = { "prettier" }, - javascriptreact = { "prettier" }, - typescript = { "prettier" }, - typescriptreact = { "prettier" }, - vue = { "prettier" }, - css = { "prettier" }, - scss = { "prettier" }, - less = { "prettier" }, - html = { "prettier" }, - json = { "prettier" }, - jsonc = { "prettier" }, - yaml = { "prettier" }, - markdown = { "prettier" }, - graphql = { "prettier" }, - svelte = { "prettier" }, - astro = { "prettier" }, - rust = { "rustfmt" }, - }, - format_on_save = { - timeout_ms = 500, - lsp_fallback = true, - }, - }) + local lspconfig_defaults = require("lspconfig").util.default_config + require("conform").setup({ + formatters_by_ft = { + javascript = { "prettier" }, + javascriptreact = { "prettier" }, + typescript = { "prettier" }, + typescriptreact = { "prettier" }, + vue = { "prettier" }, + css = { "prettier" }, + scss = { "prettier" }, + less = { "prettier" }, + html = { "prettier" }, + json = { "prettier" }, + jsonc = { "prettier" }, + yaml = { "prettier" }, + markdown = { "prettier" }, + graphql = { "prettier" }, + svelte = { "prettier" }, + astro = { "prettier" }, + rust = { "rustfmt" }, + }, + format_on_save = { + timeout_ms = 500, + lsp_fallback = true, + }, + }) - local cmp = require("cmp") - local cmp_lsp = require("cmp_nvim_lsp") - local capabilities = - vim.tbl_deep_extend("force", lspconfig_defaults.capabilities, cmp_lsp.default_capabilities()) - lspconfig_defaults.capabilities = capabilities + local cmp = require("cmp") + local cmp_lsp = require("cmp_nvim_lsp") + local capabilities = + vim.tbl_deep_extend("force", lspconfig_defaults.capabilities, cmp_lsp.default_capabilities()) + lspconfig_defaults.capabilities = capabilities - vim.api.nvim_create_autocmd("LspAttach", { - desc = "LSP actions", - callback = function(event) - local opts = { buffer = event.buf } + vim.api.nvim_create_autocmd("LspAttach", { + desc = "LSP actions", + callback = function(event) + local opts = { buffer = event.buf } - map("n", "K", "<cmd>lua vim.lsp.buf.hover()<cr>", opts) - map("n", "gd", "<cmd>lua vim.lsp.buf.definition()<cr>", opts) - map("n", "gD", "<cmd>lua vim.lsp.buf.declaration()<cr>", opts) - map("n", "gi", "<cmd>lua vim.lsp.buf.implementation()<cr>", opts) - map("n", "go", "<cmd>lua vim.lsp.buf.type_definition()<cr>", opts) - map("n", "gr", "<cmd>lua vim.lsp.buf.references()<cr>", opts) - map("n", "gs", "<cmd>lua vim.lsp.buf.signature_help()<cr>", opts) - map("n", "gq", function() - require("conform").format({ async = true, lsp_fallback = true }) - end, opts) - map("n", "<F2>", "<cmd>lua vim.lsp.buf.rename()<cr>", opts) - map({ "n", "x" }, "<F3>", "<cmd>lua vim.lsp.buf.format({async = true})<cr>", opts) - map("n", "<F4>", "<cmd>lua vim.lsp.buf.code_action()<cr>", opts) - end, - }) + map("n", "K", "<cmd>lua vim.lsp.buf.hover()<cr>", opts) + map("n", "gd", "<cmd>lua vim.lsp.buf.definition()<cr>", opts) + map("n", "gD", "<cmd>lua vim.lsp.buf.declaration()<cr>", opts) + map("n", "gi", "<cmd>lua vim.lsp.buf.implementation()<cr>", opts) + map("n", "go", "<cmd>lua vim.lsp.buf.type_definition()<cr>", opts) + map("n", "gr", "<cmd>lua vim.lsp.buf.references()<cr>", opts) + map("n", "gs", "<cmd>lua vim.lsp.buf.signature_help()<cr>", opts) + map("n", "gq", function() + require("conform").format({ async = true, lsp_fallback = true }) + end, opts) + map("n", "<F2>", "<cmd>lua vim.lsp.buf.rename()<cr>", opts) + map({ "n", "x" }, "<F3>", "<cmd>lua vim.lsp.buf.format({async = true})<cr>", opts) + map("n", "<F4>", "<cmd>lua vim.lsp.buf.code_action()<cr>", opts) + end, + }) - require("fidget").setup({}) - require("mason").setup() - require("mason-lspconfig").setup({ - handlers = { - function(server_name) - require("lspconfig")[server_name].setup({ - capabilities = capabilities, - }) - end, - ["eslint"] = function() - local lspconfig = require("lspconfig") - lspconfig.eslint.setup({ - cmd = { "vscode-eslint-language-server", "--stdio" }, - filetypes = { - "javascript", - "javascriptreact", - "javascript.jsx", - "typescript", - "typescriptreact", - "typescript.tsx", - "vue", - "svelte", - "astro", - "htmlangular", - }, - on_attach = function(client, bufnr) - vim.api.nvim_buf_set_option(bufnr, "formatexpr", "v:lua.vim.lsp.formatexpr()") - end, - capabilities = capabilities, - -- ESLint will automatically look for config files in the project - settings = { - workingDirectory = { mode = "auto" }, - }, - }) - end, - ["bashls"] = function() - local lspconfig = require("lspconfig") - lspconfig.bashls.setup({ - cmd = { "bash-language-server", "start" }, - filetypes = { "zsh", "bash", "sh" }, - capabilities = capabilities, - }) - end, - ["tailwindcss"] = function() - local lspconfig = require("lspconfig") - lspconfig.tailwindcss.setup({ - includeLangauges = { - javascript = "js", - html = "html", - typescript = "ts", - typescriptreact = "tsx", - javascriptreact = "jsx", - }, - }) - end, - ["lua_ls"] = function() - local lspconfig = require("lspconfig") - lspconfig.lua_ls.setup({ - on_init = function(client) - if client.workspace_folders then - local path = client.workspace_folders[1].name - if - path ~= vim.fn.stdpath("config") - and ( - vim.uv.fs_stat(path .. "/.luarc.json") or vim.uv.fs_stat( - path .. "/.luarc.jsonc" - ) - ) - then - return - end - end + require("fidget").setup({}) + require("mason").setup() + require("mason-lspconfig").setup({ + handlers = { - client.config.settings.Lua = vim.tbl_deep_extend("force", client.config.settings.Lua, { - runtime = { - version = "LuaJIT", - path = { - "lua/?.lua", - "lua/?/init.lua", - }, - }, - workspace = { - checkThirdParty = false, - library = vim.api.nvim_get_runtime_file("", true), - }, - }) - end, - settings = { - Lua = {}, - }, - }) - end, - }, - }) - end, + function(server_name) + if server_name == "rust_analyzer" then + return + end + + require("lspconfig")[server_name].setup({ + capabilities = capabilities, + }) + end, + ["eslint"] = function() + local lspconfig = require("lspconfig") + lspconfig.eslint.setup({ + cmd = { "vscode-eslint-language-server", "--stdio" }, + filetypes = { + "javascript", + "javascriptreact", + "javascript.jsx", + "typescript", + "typescriptreact", + "typescript.tsx", + "vue", + "svelte", + "astro", + "htmlangular", + }, + on_attach = function(client, bufnr) + vim.api.nvim_buf_set_option(bufnr, "formatexpr", "v:lua.vim.lsp.formatexpr()") + end, + capabilities = capabilities, + -- ESLint will automatically look for config files in the project + settings = { + workingDirectory = { mode = "auto" }, + }, + }) + end, + ["bashls"] = function() + local lspconfig = require("lspconfig") + lspconfig.bashls.setup({ + cmd = { "bash-language-server", "start" }, + filetypes = { "zsh", "bash", "sh" }, + capabilities = capabilities, + }) + end, + ["tailwindcss"] = function() + local lspconfig = require("lspconfig") + lspconfig.tailwindcss.setup({ + includeLangauges = { + javascript = "js", + html = "html", + typescript = "ts", + typescriptreact = "tsx", + javascriptreact = "jsx", + }, + }) + end, + ["lua_ls"] = function() + local lspconfig = require("lspconfig") + lspconfig.lua_ls.setup({ + on_init = function(client) + if client.workspace_folders then + local path = client.workspace_folders[1].name + if + path ~= vim.fn.stdpath("config") + and ( + vim.uv.fs_stat(path .. "/.luarc.json") + or vim.uv.fs_stat(path .. "/.luarc.jsonc") + ) + then + return + end + end + + client.config.settings.Lua = vim.tbl_deep_extend("force", client.config.settings.Lua, { + runtime = { + version = "LuaJIT", + path = { + "lua/?.lua", + "lua/?/init.lua", + }, + }, + workspace = { + checkThirdParty = false, + library = vim.api.nvim_get_runtime_file("", true), + }, + }) + end, + settings = { + Lua = {}, + }, + }) + end, + }, + }) + end, } diff --git a/.config/shell/profile b/.config/shell/profile @@ -19,6 +19,7 @@ export XDG_DATA_HOME="$HOME/.local/share" export XDG_PUBLICSHARE_DIR="$HOME/Cloud" export XDG_DOWNLOAD_DIR="$HOME/Downloads" export XDG_DOTFILES="$HOME/dots" +export XDG_DATA_DIRS="$XDG_DATA_DIRS:$XDG_DATA_HOME/applications" # Shell: export ZDOTDIR="$XDG_CONFIG_HOME/zsh" diff --git a/.local/bin/scripts/trm b/.local/bin/scripts/trm @@ -21,14 +21,13 @@ finish() { } start() { - var=$(nmcli | grep wlp3s0:\ connect | awk '{printf $4}') - transmission-daemon -g /home/mika/.config/transmission-daemon/ --foreground --log-info 2<&1 |\ + transmission-daemon -g /home/mika/.config/transmission-daemon/ --foreground --log-level=info 2>&1 |\ while read line; do echo $line |\ grep -v "announcer.c:\|platform.c:\|announce done (tr-dht.c:" |\ grep -v "Saved.*variant.c:" |\ while read line; do - echo $line | grep -q started &&\ + echo $line | grep -qi "starting\|started" &&\ notify-send "Transmission Started" " " echo $line | systemd-cat --identifier="TransWrap" --priority=5 done 2>&1 > /dev/null diff --git a/.local/share/applications/cal.desktop b/.local/share/applications/cal.desktop @@ -1,4 +1,4 @@ [Desktop Entry] Type=Application Name=Calendar -Exec=/usr/local/bin/st -e calcurse -i %u +Exec=st -e calcurse -i %u diff --git a/.local/share/applications/file.desktop b/.local/share/applications/file.desktop @@ -1,4 +1,4 @@ [Desktop Entry] Type=Application Name=File Manager -Exec=/usr/local/nautilus %u +Exec=nautilus %u diff --git a/.local/share/applications/gif.desktop b/.local/share/applications/gif.desktop @@ -1,4 +1,4 @@ [Desktop Entry] Type=Application Name=Image viewer -Exec=/usr/bin/sxiv -A 25 %f +Exec=sxiv -A 25 %f diff --git a/.local/share/applications/img.desktop b/.local/share/applications/img.desktop @@ -1,4 +1,4 @@ [Desktop Entry] Type=Application Name=Image viewer -Exec=/usr/bin/sxiv -a %f +Exec=sxiv -a %f diff --git a/.local/share/applications/mail.desktop b/.local/share/applications/mail.desktop @@ -1,4 +1,4 @@ [Desktop Entry] Type=Application Name=Mail -Exec=/usr/local/bin/st -e neomutt %u +Exec=st -e neomutt %u diff --git a/.local/share/applications/pdf.desktop b/.local/share/applications/pdf.desktop @@ -1,4 +1,4 @@ [Desktop Entry] Type=Application Name=PDF reader -Exec=/usr/bin/zathura %u +Exec=zathura %u