summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJack Jamison <jackqjamison@gmail.com>2025-07-08 19:11:27 -0400
committerJack Jamison <jackqjamison@gmail.com>2025-07-08 19:13:00 -0400
commit66cf16d9f9124b5f6790565b2b98ead97e501595 (patch)
tree0d49e52fc5d2a624cda547f5546c222e5779a1b3
parenta3f2d12da279d75432dcade5c35d9bed0eacd171 (diff)
xdg and plugins
-rw-r--r--.config/hypr/hyprland.conf6
-rw-r--r--.config/nvim/TODO2
-rw-r--r--.config/nvim/lua/options.lua3
-rw-r--r--.config/nvim/lua/plugins/glance.lua10
-rw-r--r--.config/nvim/lua/plugins/lspconfig.lua19
-rw-r--r--.config/nvim/lua/plugins/signature.lua10
-rw-r--r--.config/nvim/lua/plugins/trouble.lua37
-rwxr-xr-xscripts/start-xdg-portal-hyprland12
8 files changed, 98 insertions, 1 deletions
diff --git a/.config/hypr/hyprland.conf b/.config/hypr/hyprland.conf
index 6a9e9c3..366fe5b 100644
--- a/.config/hypr/hyprland.conf
+++ b/.config/hypr/hyprland.conf
@@ -10,6 +10,12 @@ env = XCURSOR_THEME,whiteglass
exec-once = startup
exec-once = hyprctl dispatch workspace 1
+env = XDG_CURRENT_DESKTOP, Hyprland
+env = XDG_SESSION_TYPE, wayland
+env = XDG_SESSION_DESKTOP, Hyprland
+exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
+exec-once = start-xdg-portal-hyprland
+
input {
kb_layout = us
kb_options = ctrl:nocaps
diff --git a/.config/nvim/TODO b/.config/nvim/TODO
index bb924ac..c8cc46a 100644
--- a/.config/nvim/TODO
+++ b/.config/nvim/TODO
@@ -1,2 +1,4 @@
- save more than one yank (emacs killring like)
- undo chunks typed in insert mode
+- argument preview in status bar
+- next snippet argument
diff --git a/.config/nvim/lua/options.lua b/.config/nvim/lua/options.lua
index 2010277..9a5901c 100644
--- a/.config/nvim/lua/options.lua
+++ b/.config/nvim/lua/options.lua
@@ -32,3 +32,6 @@ vim.opt.swapfile = false
vim.opt.backup = false
vim.opt.undodir = os.getenv("HOME") .. "/.cache/nvim/undodir"
vim.opt.undofile = true
+
+-- misc
+vim.opt.updatetime = 700
diff --git a/.config/nvim/lua/plugins/glance.lua b/.config/nvim/lua/plugins/glance.lua
new file mode 100644
index 0000000..9c43939
--- /dev/null
+++ b/.config/nvim/lua/plugins/glance.lua
@@ -0,0 +1,10 @@
+return {
+ 'dnlhc/glance.nvim',
+ cmd = 'Glance',
+ config = function()
+ require("glance").setup({})
+ end,
+ keys = {
+ { 'gr', '<CMD>Glance references<CR>' }
+ }
+}
diff --git a/.config/nvim/lua/plugins/lspconfig.lua b/.config/nvim/lua/plugins/lspconfig.lua
index 2fcfa9b..86194b1 100644
--- a/.config/nvim/lua/plugins/lspconfig.lua
+++ b/.config/nvim/lua/plugins/lspconfig.lua
@@ -8,7 +8,7 @@ local on_attach = function(client, bufnr)
keymap('n', 'gD', vim.lsp.buf.declaration, { desc = 'Go to declaration' })
keymap('n', 'gI', vim.lsp.buf.implementation, { desc = 'Go to implementation' })
keymap('n', 'gy', vim.lsp.buf.type_definition, { desc = 'Go to type definition' })
- keymap('n', 'gr', vim.lsp.buf.references, { desc = 'List references' })
+ -- keymap('n', 'gr', vim.lsp.buf.references, { desc = 'List references' })
keymap('n', '<leader>ds', vim.lsp.buf.document_symbol, { desc = 'List document symbols' })
keymap('n', '<leader>ws', vim.lsp.buf.workspace_symbol, { desc = 'List workspace symbols' })
@@ -74,5 +74,22 @@ return {
end,
}
end
+
+ -- Autohighlight symbol under cursor
+ vim.api.nvim_create_autocmd({ "CursorHold", "CursorHoldI" }, {
+ callback = function()
+ local bufnr = vim.api.nvim_get_current_buf()
+ if next(vim.lsp.get_clients({ buffer = bufnr })) then
+ vim.lsp.buf.document_highlight()
+ end
+ end,
+ })
+ -- Clear highlights when cursor moves
+ vim.api.nvim_create_autocmd({ "CursorMoved", "CursorMovedI" }, {
+ callback = function()
+ vim.lsp.buf.clear_references()
+ end,
+ })
+
end
}
diff --git a/.config/nvim/lua/plugins/signature.lua b/.config/nvim/lua/plugins/signature.lua
new file mode 100644
index 0000000..0d0a174
--- /dev/null
+++ b/.config/nvim/lua/plugins/signature.lua
@@ -0,0 +1,10 @@
+return {
+ "ray-x/lsp_signature.nvim",
+ event = "InsertEnter",
+ opts = {
+ bind = true,
+ handler_opts = {
+ border = "rounded"
+ }
+ },
+}
diff --git a/.config/nvim/lua/plugins/trouble.lua b/.config/nvim/lua/plugins/trouble.lua
new file mode 100644
index 0000000..3741f30
--- /dev/null
+++ b/.config/nvim/lua/plugins/trouble.lua
@@ -0,0 +1,37 @@
+return {
+ "folke/trouble.nvim",
+ opts = {}, -- for default options, refer to the configuration section for custom setup.
+ cmd = "Trouble",
+ keys = {
+ {
+ "<leader>xx",
+ "<cmd>Trouble diagnostics toggle<cr>",
+ desc = "Diagnostics (Trouble)",
+ },
+ {
+ "<leader>xX",
+ "<cmd>Trouble diagnostics toggle filter.buf=0<cr>",
+ desc = "Buffer Diagnostics (Trouble)",
+ },
+ {
+ "<leader>cs",
+ "<cmd>Trouble symbols toggle focus=false<cr>",
+ desc = "Symbols (Trouble)",
+ },
+ {
+ "<leader>cl",
+ "<cmd>Trouble lsp toggle focus=false win.position=right<cr>",
+ desc = "LSP Definitions / references / ... (Trouble)",
+ },
+ {
+ "<leader>xL",
+ "<cmd>Trouble loclist toggle<cr>",
+ desc = "Location List (Trouble)",
+ },
+ {
+ "<leader>xQ",
+ "<cmd>Trouble qflist toggle<cr>",
+ desc = "Quickfix List (Trouble)",
+ },
+ },
+}
diff --git a/scripts/start-xdg-portal-hyprland b/scripts/start-xdg-portal-hyprland
new file mode 100755
index 0000000..80a17dd
--- /dev/null
+++ b/scripts/start-xdg-portal-hyprland
@@ -0,0 +1,12 @@
+#!/bin/sh
+sleep 1
+killall xdg-desktop-portal-hyprland
+killall xdg-desktop-portal-gnome
+killall xdg-desktop-portal-wlr
+killall xdg-desktop-portal
+
+sleep 1
+/usr/libexec/xdg-desktop-portal-hyprland &
+
+sleep 2
+/usr/libexec/xdg-desktop-portal &