From a200bb723347dac24c919126440c7c97d8ce5145 Mon Sep 17 00:00:00 2001 From: kokopi-dev Date: Sun, 5 Apr 2026 01:17:16 +0900 Subject: [PATCH] update:script remapping + nvim --- mango/mango/keybindings.conf | 10 +++++----- nvim/init.lua | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 5 deletions(-) diff --git a/mango/mango/keybindings.conf b/mango/mango/keybindings.conf index 6d979e3..2beb142 100644 --- a/mango/mango/keybindings.conf +++ b/mango/mango/keybindings.conf @@ -15,11 +15,11 @@ bind=SUPER,r,reload_config # utility / screenshot / screen record # scripts probably in ~/.local/bin # - area select screenshot -bind=SUPER+ALT,p,spawn,ss.sh +bind=SUPER+ALT,p,spawn,mangowm-screenshot # - monitor select screenshot -bind=SUPER+ALT+CTRL,p,spawn,ss.sh screen +bind=SUPER+ALT+CTRL,p,spawn,mangowm-screenshot screen # - screen capture/record -bind=SUPER+ALT,v,spawn,sc.sh +bind=SUPER+ALT,v,spawn,mangowm-screenrecord bind=SUPER,Return,spawn,ghostty bind=SUPER,e,spawn,thunar @@ -27,8 +27,8 @@ bind=none,XF86AudioRaiseVolume,spawn,wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ bind=none,XF86AudioLowerVolume,spawn,wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- bind=none,XF86AudioMute,spawn,wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle bind=none,XF86AudioMicMute,spawn,wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle -bind=none,XF86MonBrightnessUp,spawn,python ~/.local/bin/brightness.py + -bind=none,XF86MonBrightnessDown,spawn,python ~/.local/bin/brightness.py - +bind=none,XF86MonBrightnessUp,spawn,mangowm-brightness + +bind=none,XF86MonBrightnessDown,spawn,mangowm-brightness - # exit bind=SUPER,m,quit diff --git a/nvim/init.lua b/nvim/init.lua index e83f735..3ac0e95 100644 --- a/nvim/init.lua +++ b/nvim/init.lua @@ -161,6 +161,9 @@ require("lazy").setup({ -- syntax highlighter and stuff { "nvim-treesitter/nvim-treesitter", + dependencies = { + 'nvim-treesitter/nvim-treesitter-refactor', + }, build = ":TSUpdate", config = function() local configs = require("nvim-treesitter.configs") @@ -183,6 +186,19 @@ require("lazy").setup({ sync_install = false, highlight = { enable = true }, indent = { enable = true }, + refactor = { + smart_rename = { + enable = true, + keymaps = { + smart_rename = 'lr', -- "local rename" + }, + }, + -- optional: highlights the block scope of the symbol under cursor + highlight_definitions = { + enable = true, + clear_on_cursor_move = true, + }, + }, }) end, }, @@ -338,6 +354,13 @@ require("lazy").setup({ ---@type oklch.Opts opts = {}, }, + -- markdown render + { + "MeanderingProgrammer/render-markdown.nvim", + dependencies = { "nvim-treesitter/nvim-treesitter" }, + ft = { "markdown" }, + opts = {}, + }, }) -- end lazy package manager setup @@ -527,6 +550,12 @@ vim.lsp.config('lua_ls', { }) vim.lsp.enable('lua_ls') +-- rust +vim.lsp.config('rust_analyzer', { + capabilities = capabilities, +}) +vim.lsp.enable('rust_analyzer') + local has_words_before = function() unpack = unpack or table.unpack local line, col = unpack(vim.api.nvim_win_get_cursor(0)) @@ -808,6 +837,9 @@ vim.api.nvim_create_autocmd("LspAttach", { vim.keymap.set({ "n", "v" }, "ca", vim.lsp.buf.code_action, opts) vim.keymap.set("n", "gd", custom_go_to_definition, opts) vim.keymap.set("n", "gr", require('telescope.builtin').lsp_references, opts) + -- full project-wide rename (LSP-aware, cross-file) + vim.keymap.set('n', 'ar', vim.lsp.buf.rename, + vim.tbl_extend('force', opts, { desc = 'LSP: Rename all references' })) end, }) -- end lsp stuff