update:script remapping + nvim

This commit is contained in:
kokopi-dev
2026-04-05 01:17:16 +09:00
parent 8d9347d942
commit a200bb7233
2 changed files with 37 additions and 5 deletions

View File

@@ -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

View File

@@ -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 = '<leader>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" }, "<leader>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', '<leader>ar', vim.lsp.buf.rename,
vim.tbl_extend('force', opts, { desc = 'LSP: Rename all references' }))
end,
})
-- end lsp stuff