diff --git a/.config/hypr/hyprland.conf b/.config/hypr/hyprland.conf index a732040..a681330 100644 --- a/.config/hypr/hyprland.conf +++ b/.config/hypr/hyprland.conf @@ -139,8 +139,8 @@ input { kb_layout = us kb_variant = kb_model = - kb_options = kb_options = caps:swapescape - # kb_options = = + # kb_options = caps:swapescape + kb_options = kb_rules = follow_mouse = 1 @@ -186,6 +186,9 @@ bind = $mainMod, M, exec, ~/.local/bin/hyprland-monitor-switcher.sh bind = $mainMod SHIFT, L, exec, hyprlock bind = $mainMod, S, exec, hyprshot -m region --clipboard-only +bind = $mainMod, T, exec, ~/.local/bin/toggle-swapescape-hyprland +bind = $mainMod SHIFT, T, exec, ~/.local/bin/toggle-swapescape-hyprland + bind = $mainMod, Return, layoutmsg, swapwithmaster bind = $mainMod, j, layoutmsg, cyclenext bind = $mainMod, k, layoutmsg, cycleprev diff --git a/.config/nvim/lua/plugins/blink.lua b/.config/nvim/lua/plugins/blink.lua index 9b823fe..8dbe780 100644 --- a/.config/nvim/lua/plugins/blink.lua +++ b/.config/nvim/lua/plugins/blink.lua @@ -20,7 +20,6 @@ return { winblend = vim.o.pumblend, scrollbar = true, border = 'single', - max_items = 200, draw = { columns = { { "label", "label_description", gap = 1 }, diff --git a/.config/nvim/lua/plugins/conform.lua b/.config/nvim/lua/plugins/conform.lua index bd11c76..c56b811 100644 --- a/.config/nvim/lua/plugins/conform.lua +++ b/.config/nvim/lua/plugins/conform.lua @@ -10,6 +10,7 @@ return { go = { "goimports", "gofmt" }, javascript = { "prettierd" }, typescript = { "prettierd" }, + typescriptreact = { "prettierd" }, vue = { "prettierd" }, css = { "prettierd" }, html = { "prettierd" }, diff --git a/.config/nvim/lua/plugins/demicolon.lua b/.config/nvim/lua/plugins/demicolon.lua new file mode 100644 index 0000000..bf5197e --- /dev/null +++ b/.config/nvim/lua/plugins/demicolon.lua @@ -0,0 +1,8 @@ +return { + 'mawkler/demicolon.nvim', + dependencies = { + 'nvim-treesitter/nvim-treesitter', + 'nvim-treesitter/nvim-treesitter-textobjects', + }, + opts = {} +} diff --git a/.config/nvim/lua/plugins/linting.lua b/.config/nvim/lua/plugins/linting.lua index 7d0c7b6..262aba3 100644 --- a/.config/nvim/lua/plugins/linting.lua +++ b/.config/nvim/lua/plugins/linting.lua @@ -54,6 +54,7 @@ return { lint.linters_by_ft = { javascript = { "eslint" }, typescript = { "eslint" }, + typescriptreact = { "eslint" }, vue = { "eslint" }, json = { "jsonlint" }, markdown = { "markdownlint" }, diff --git a/.config/nvim/lua/plugins/lspconfig.lua b/.config/nvim/lua/plugins/lspconfig.lua index 1470502..1ebe415 100644 --- a/.config/nvim/lua/plugins/lspconfig.lua +++ b/.config/nvim/lua/plugins/lspconfig.lua @@ -3,16 +3,16 @@ return { event = { "BufReadPre", "BufNewFile" }, dependencies = { { "saghen/blink.cmp" }, - { "antosha417/nvim-lsp-file-operations", config = true }, - { "williamboman/mason.nvim", config = true }, - { "williamboman/mason-lspconfig.nvim" }, - { "WhoIsSethDaniel/mason-tool-installer.nvim" }, - { "j-hui/fidget.nvim", opts = {} }, - { "folke/neodev.nvim", opts = {} }, - { 'dmmulroy/ts-error-translator.nvim', opts = {} }, + { "antosha417/nvim-lsp-file-operations", config = true }, + { "williamboman/mason.nvim", config = true }, + { "williamboman/mason-lspconfig.nvim" }, + { "WhoIsSethDaniel/mason-tool-installer.nvim" }, + { "j-hui/fidget.nvim", opts = {} }, + { "folke/neodev.nvim", opts = {} }, + { 'dmmulroy/ts-error-translator.nvim', opts = {} }, + { 'mawkler/refjump.nvim', opts = {}, event = 'LspAttach', }, }, config = function() - local lspconfig = require("lspconfig") local utils = require("lsp.utils") vim.api.nvim_create_autocmd("LspAttach", { @@ -43,7 +43,7 @@ return { }, signs = true, underline = true, - update_in_insert = false, + update_in_insert = true, severity_sort = true, }) @@ -69,10 +69,16 @@ return { end end - -- Setup all servers + -- Setup all servers using the new vim.lsp.config and vim.lsp.enable APIs for server_name, server in pairs(servers) do + -- Merge capabilities server.capabilities = vim.tbl_deep_extend("force", {}, capabilities, server.capabilities or {}) - lspconfig[server_name].setup(server) + + -- Use vim.lsp.config to define/customize the server configuration + vim.lsp.config(server_name, server) + + -- Use vim.lsp.enable to activate the server for its filetypes + vim.lsp.enable(server_name) end end, } diff --git a/.local/bin/toggle-swapescape-hyprland b/.local/bin/toggle-swapescape-hyprland new file mode 100755 index 0000000..5c35c2a --- /dev/null +++ b/.local/bin/toggle-swapescape-hyprland @@ -0,0 +1,17 @@ +#!/bin/bash + +# Script to toggle caps:swapescape setting in Hyprland +# Save this as ~/.config/hypr/scripts/toggle-caps-escape.sh + +# Check current state +current_setting=$(hyprctl getoption input:kb_options | grep -o "caps:swapescape" || echo "") + +if [ -n "$current_setting" ]; then + # Currently swapped, disable it + hyprctl keyword input:kb_options "" + notify-send "Keyboard Layout" "Caps Lock and Escape returned to normal" -i input-keyboard +else + # Not swapped, enable it + hyprctl keyword input:kb_options "caps:swapescape" + notify-send "Keyboard Layout" "Caps Lock and Escape swapped" -i input-keyboard +fi