From 9ab4749b2df18d8e4bda40ee05bfa6e75255f7f4 Mon Sep 17 00:00:00 2001 From: Dino Date: Wed, 29 Apr 2026 15:42:07 +0300 Subject: [PATCH 1/2] Backup --- after/ftplugin/vala.lua | 6 ++ init.lua | 66 +++++++++---- lua/custom/plugins/hbac.nvim.lua | 15 +++ lua/custom/plugins/lazydocker.lua | 11 +++ lua/custom/plugins/nvim-diffview.lua | 3 + lua/custom/plugins/nvim-hlslens.lua | 1 + lua/custom/plugins/nvim-lazygit.lua | 20 ++++ lua/custom/plugins/nvim-project.lua | 34 +++++++ lua/custom/plugins/nvim-rest.lua | 126 +++++++++++++++++++++++++ lua/custom/plugins/nvim-scrollbar.lua | 15 +++ lua/custom/plugins/nvim-toggleterm.lua | 15 +++ lua/custom/plugins/undotree.lua | 8 ++ lua/custom/plugins/vim-dadbod-ui.lua | 17 ++++ lua/custom/plugins/vim-dotenv.lua | 1 + lua/custom/plugins/vim-fugitive.lua | 3 + lua/custom/plugins/vim-signature.lua | 3 + lua/custom/plugins/vim-signify.lua | 3 + lua/custom/plugins/wakatime.lua | 1 + lua/kickstart/plugins/debug.lua | 14 +++ lua/kickstart/plugins/gitsigns.lua | 8 ++ lua/kickstart/plugins/neo-tree.lua | 11 +++ 21 files changed, 364 insertions(+), 17 deletions(-) create mode 100644 after/ftplugin/vala.lua create mode 100644 lua/custom/plugins/hbac.nvim.lua create mode 100644 lua/custom/plugins/lazydocker.lua create mode 100644 lua/custom/plugins/nvim-diffview.lua create mode 100644 lua/custom/plugins/nvim-hlslens.lua create mode 100644 lua/custom/plugins/nvim-lazygit.lua create mode 100644 lua/custom/plugins/nvim-project.lua create mode 100644 lua/custom/plugins/nvim-rest.lua create mode 100644 lua/custom/plugins/nvim-scrollbar.lua create mode 100644 lua/custom/plugins/nvim-toggleterm.lua create mode 100644 lua/custom/plugins/undotree.lua create mode 100644 lua/custom/plugins/vim-dadbod-ui.lua create mode 100644 lua/custom/plugins/vim-dotenv.lua create mode 100644 lua/custom/plugins/vim-fugitive.lua create mode 100644 lua/custom/plugins/vim-signature.lua create mode 100644 lua/custom/plugins/vim-signify.lua create mode 100644 lua/custom/plugins/wakatime.lua diff --git a/after/ftplugin/vala.lua b/after/ftplugin/vala.lua new file mode 100644 index 00000000000..31a5ec960e5 --- /dev/null +++ b/after/ftplugin/vala.lua @@ -0,0 +1,6 @@ +-- Set indentation for Vala files +vim.bo.shiftwidth = 4 -- number of spaces for each indent +vim.bo.tabstop = 4 -- display width of a tab +vim.bo.expandtab = true -- convert tabs to spaces +vim.bo.smartindent = true +vim.bo.commentstring = '// %s' diff --git a/init.lua b/init.lua index b98ffc6198a..8deaf74de1a 100644 --- a/init.lua +++ b/init.lua @@ -91,7 +91,7 @@ vim.g.mapleader = ' ' vim.g.maplocalleader = ' ' -- Set to true if you have a Nerd Font installed and selected in the terminal -vim.g.have_nerd_font = false +vim.g.have_nerd_font = true -- [[ Setting options ]] -- See `:help vim.o` @@ -102,7 +102,7 @@ vim.g.have_nerd_font = false vim.o.number = true -- You can also add relative line numbers, to help with jumping. -- Experiment for yourself to see if you like it! --- vim.o.relativenumber = true +vim.o.relativenumber = true -- Enable mouse mode, can be useful for resizing splits for example! vim.o.mouse = 'a' @@ -185,10 +185,10 @@ vim.keymap.set('n', 'q', vim.diagnostic.setloclist, { desc = 'Open diagn vim.keymap.set('t', '', '', { desc = 'Exit terminal mode' }) -- TIP: Disable arrow keys in normal mode --- vim.keymap.set('n', '', 'echo "Use h to move!!"') --- vim.keymap.set('n', '', 'echo "Use l to move!!"') --- vim.keymap.set('n', '', 'echo "Use k to move!!"') --- vim.keymap.set('n', '', 'echo "Use j to move!!"') +vim.keymap.set('n', '', 'echo "Use h to move!!"') +vim.keymap.set('n', '', 'echo "Use l to move!!"') +vim.keymap.set('n', '', 'echo "Use k to move!!"') +vim.keymap.set('n', '', 'echo "Use j to move!!"') -- Keybinds to make split navigation easier. -- Use CTRL+ to switch between windows @@ -200,10 +200,10 @@ vim.keymap.set('n', '', '', { desc = 'Move focus to the lower win vim.keymap.set('n', '', '', { desc = 'Move focus to the upper window' }) -- NOTE: Some terminals have colliding keymaps or are not able to send distinct keycodes --- vim.keymap.set("n", "", "H", { desc = "Move window to the left" }) --- vim.keymap.set("n", "", "L", { desc = "Move window to the right" }) --- vim.keymap.set("n", "", "J", { desc = "Move window to the lower" }) --- vim.keymap.set("n", "", "K", { desc = "Move window to the upper" }) +vim.keymap.set('n', '', 'H', { desc = 'Move window to the left' }) +vim.keymap.set('n', '', 'L', { desc = 'Move window to the right' }) +vim.keymap.set('n', '', 'J', { desc = 'Move window to the lower' }) +vim.keymap.set('n', '', 'K', { desc = 'Move window to the upper' }) -- [[ Basic Autocommands ]] -- See `:help lua-guide-autocommands` @@ -403,6 +403,7 @@ require('lazy').setup({ -- [[ Configure Telescope ]] -- See `:help telescope` and `:help telescope.setup()` + local actions = require 'telescope.actions' require('telescope').setup { -- You can put your default mappings / updates / etc. in here -- All the info you're looking for is in `:help telescope.setup()` @@ -413,6 +414,15 @@ require('lazy').setup({ -- }, -- }, -- pickers = {} + pickers = { + buffers = { + mappings = { + i = { + [''] = actions.delete_buffer, -- + actions.move_selection_previous, + }, + }, + }, + }, extensions = { ['ui-select'] = { require('telescope.themes').get_dropdown(), @@ -671,6 +681,8 @@ require('lazy').setup({ -- - settings (table): Override the default settings passed when initializing the server. -- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/ local servers = { + gdtoolkit = {}, + vala_ls = {}, -- clangd = {}, -- gopls = {}, -- pyright = {}, @@ -768,6 +780,7 @@ require('lazy').setup({ end, formatters_by_ft = { lua = { 'stylua' }, + gdscript = { 'gdformat' }, -- Conform can also run multiple formatters sequentially -- python = { "isort", "black" }, -- @@ -944,7 +957,7 @@ require('lazy').setup({ main = 'nvim-treesitter.configs', -- Sets main module to use for opts -- [[ Configure Treesitter ]] See `:help nvim-treesitter` opts = { - ensure_installed = { 'bash', 'c', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'markdown_inline', 'query', 'vim', 'vimdoc' }, + ensure_installed = { 'bash', 'c', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'markdown_inline', 'query', 'vim', 'vimdoc', 'gdscript', 'php', 'vala' }, -- Autoinstall languages that are not installed auto_install = true, highlight = { @@ -973,18 +986,18 @@ require('lazy').setup({ -- Here are some example plugins that I've included in the Kickstart repository. -- Uncomment any of the lines below to enable them (you will need to restart nvim). -- - -- require 'kickstart.plugins.debug', - -- require 'kickstart.plugins.indent_line', - -- require 'kickstart.plugins.lint', + require 'kickstart.plugins.debug', + require 'kickstart.plugins.indent_line', + require 'kickstart.plugins.lint', -- require 'kickstart.plugins.autopairs', - -- require 'kickstart.plugins.neo-tree', - -- require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps + require 'kickstart.plugins.neo-tree', + require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps -- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua` -- This is the easiest way to modularize your config. -- -- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going. - -- { import = 'custom.plugins' }, + { import = 'custom.plugins' }, -- -- For additional information with loading, sourcing and examples see `:help lazy.nvim-🔌-plugin-spec` -- Or use telescope! @@ -1012,5 +1025,24 @@ require('lazy').setup({ }, }) +local is_listening = false +vim.lsp.config('gdscript', { + on_attach = function(_client, _bufnr) + if is_listening == false then + is_listening = true + vim.fn.serverstart '/tmp/godot.pipe' + end + end, +}) +vim.lsp.enable 'gdscript' + +-- require('lspconfig').vala_ls.setup { +-- -- defaults, no need to specify these +-- cmd = { 'vala-language-server' }, +-- filetypes = { 'vala', 'genie' }, +-- root_dir = root_pattern('meson.build', '.git'), +-- single_file_support = true, +-- commentstring = '//%s', +-- } -- The line beneath this is called `modeline`. See `:help modeline` -- vim: ts=2 sts=2 sw=2 et diff --git a/lua/custom/plugins/hbac.nvim.lua b/lua/custom/plugins/hbac.nvim.lua new file mode 100644 index 00000000000..4cac279cd26 --- /dev/null +++ b/lua/custom/plugins/hbac.nvim.lua @@ -0,0 +1,15 @@ +return { + 'axkirillov/hbac.nvim', + config = true, + opts = { + autoclose = true, -- set autoclose to false if you want to close manually + threshold = 32, -- hbac will start closing unedited buffers once that number is reached + close_command = function(bufnr) + vim.api.nvim_buf_delete(bufnr, {}) + end, + close_buffers_with_windows = false, -- hbac will close buffers with associated windows if this option is `true` + telescope = { + -- See #telescope-configuration below + }, + }, +} diff --git a/lua/custom/plugins/lazydocker.lua b/lua/custom/plugins/lazydocker.lua new file mode 100644 index 00000000000..956be817c58 --- /dev/null +++ b/lua/custom/plugins/lazydocker.lua @@ -0,0 +1,11 @@ +return { + 'crnvl96/lazydocker.nvim', + event = 'VeryLazy', + opts = {}, -- automatically calls `require("lazydocker").setup()` + dependencies = { + 'MunifTanjim/nui.nvim', + }, + keys = { + { 'ld', 'LazyDocker', desc = 'LazyDocker' }, + }, +} diff --git a/lua/custom/plugins/nvim-diffview.lua b/lua/custom/plugins/nvim-diffview.lua new file mode 100644 index 00000000000..eae0ef2ce0a --- /dev/null +++ b/lua/custom/plugins/nvim-diffview.lua @@ -0,0 +1,3 @@ +return { + 'sindrets/diffview.nvim', +} diff --git a/lua/custom/plugins/nvim-hlslens.lua b/lua/custom/plugins/nvim-hlslens.lua new file mode 100644 index 00000000000..aeecd06bf50 --- /dev/null +++ b/lua/custom/plugins/nvim-hlslens.lua @@ -0,0 +1 @@ +return { 'kevinhwang91/nvim-hlslens' } diff --git a/lua/custom/plugins/nvim-lazygit.lua b/lua/custom/plugins/nvim-lazygit.lua new file mode 100644 index 00000000000..254236bcc0e --- /dev/null +++ b/lua/custom/plugins/nvim-lazygit.lua @@ -0,0 +1,20 @@ +return { + 'kdheepak/lazygit.nvim', + lazy = true, + cmd = { + 'LazyGit', + 'LazyGitConfig', + 'LazyGitCurrentFile', + 'LazyGitFilter', + 'LazyGitFilterCurrentFile', + }, + -- optional for floating window border decoration + dependencies = { + 'nvim-lua/plenary.nvim', + }, + -- setting the keybinding for LazyGit with 'keys' is recommended in + -- order to load the plugin when the command is run for the first time + keys = { + { 'lg', 'LazyGit', desc = 'LazyGit' }, + }, +} diff --git a/lua/custom/plugins/nvim-project.lua b/lua/custom/plugins/nvim-project.lua new file mode 100644 index 00000000000..bb0fe38ebc7 --- /dev/null +++ b/lua/custom/plugins/nvim-project.lua @@ -0,0 +1,34 @@ +return { + 'coffebar/neovim-project', + opts = { + projects = { -- define project roots + '~/project/dinobits/games/*', + '~/project/dinobits/work/*/*', + '~/project/linux/*', + '~/project/jams/*/*', + '~/.config/*', + }, + picker = { + type = 'telescope', -- one of "telescope", "fzf-lua", or "snacks" + }, + }, + init = function() + -- enable saving the state of plugins in the session + vim.opt.sessionoptions:append 'globals' -- save global variables that start with an uppercase letter and contain at least one lowercase letter. + end, + dependencies = { + { 'nvim-lua/plenary.nvim' }, + -- optional picker + { 'nvim-telescope/telescope.nvim', tag = '0.1.4' }, + -- optional picker + { 'ibhagwan/fzf-lua' }, + -- optional picker + { 'folke/snacks.nvim' }, + { 'Shatur/neovim-session-manager' }, + }, + lazy = false, + priority = 100, + keys = { + { 'sp', ':NeovimProjectDiscover', desc = 'Neovim [P]roject Discover ([S]earch)', silent = true }, + }, +} diff --git a/lua/custom/plugins/nvim-rest.lua b/lua/custom/plugins/nvim-rest.lua new file mode 100644 index 00000000000..58ea420d775 --- /dev/null +++ b/lua/custom/plugins/nvim-rest.lua @@ -0,0 +1,126 @@ +return { + -- { + -- 'rest-nvim/rest.nvim', + -- dependencies = { + -- 'nvim-treesitter/nvim-treesitter', + -- opts = function(_, opts) + -- opts.ensure_installed = opts.ensure_installed or {} + -- table.insert(opts.ensure_installed, 'http') + -- end, + -- }, + -- }, + -- { + -- 'vhyrro/luarocks.nvim', + -- priority = 1000, + -- config = true, + -- opts = { + -- -- luarocks_build_args = { + -- -- '--with-lua-bin=/usr/bin/lua', + -- -- }, + -- rocks = { 'lua-curl', 'nvim-nio', 'mimetypes', 'xml2lua' }, + -- }, + -- }, +} +-- { +-- 'rest-nvim/rest.nvim', +-- ft = 'http', +-- dependencies = { 'luarocks.nvim' }, +-- config = function() +-- local default_config = { +-- client = 'curl', +-- env_file = '.env', +-- env_pattern = '\\.env$', +-- env_edit_command = 'tabedit', +-- encode_url = true, +-- skip_ssl_verification = false, +-- custom_dynamic_variables = {}, +-- logs = { +-- level = 'info', +-- save = true, +-- }, +-- result = { +-- split = { +-- horizontal = false, +-- in_place = false, +-- stay_in_current_window_after_split = true, +-- }, +-- behavior = { +-- decode_url = true, +-- show_info = { +-- url = true, +-- headers = true, +-- http_info = true, +-- curl_command = true, +-- }, +-- statistics = { +-- enable = true, +-- ---@see https://curl.se/libcurl/c/curl_easy_getinfo.html +-- stats = { +-- { 'total_time', title = 'Time taken:' }, +-- { 'size_download_t', title = 'Download size:' }, +-- }, +-- }, +-- formatters = { +-- json = 'jq', +-- html = function(body) +-- if vim.fn.executable 'tidy' == 0 then +-- return body, { found = false, name = 'tidy' } +-- end +-- local fmt_body = vim.fn +-- .system({ +-- 'tidy', +-- '-i', +-- '-q', +-- '--tidy-mark', +-- 'no', +-- '--show-body-only', +-- 'auto', +-- '--show-errors', +-- '0', +-- '--show-warnings', +-- '0', +-- '-', +-- }, body) +-- :gsub('\n$', '') +-- +-- return fmt_body, { found = true, name = 'tidy' } +-- end, +-- }, +-- }, +-- keybinds = { +-- buffer_local = true, +-- prev = 'H', +-- next = 'L', +-- }, +-- }, +-- highlight = { +-- enable = true, +-- timeout = 750, +-- }, +-- ---Example: +-- --- +-- ---```lua +-- ---keybinds = { +-- --- { +-- --- "rr", "Rest run", "Run request under the cursor", +-- --- }, +-- --- { +-- --- "rl", "Rest run last", "Re-run latest request", +-- --- }, +-- ---} +-- --- +-- ---``` +-- ---@see vim.keymap.set +-- keybinds = {}, +-- +-- --- { +-- --- "rr", "Rest run", "Run request under the cursor", +-- --- }, +-- --- { +-- --- "rl", "Rest run last", "Re-run latest request", +-- --- }, +-- } +-- require('rest-nvim').setup(default_config) +-- end, +-- }, +-- } diff --git a/lua/custom/plugins/nvim-scrollbar.lua b/lua/custom/plugins/nvim-scrollbar.lua new file mode 100644 index 00000000000..e4da113aa64 --- /dev/null +++ b/lua/custom/plugins/nvim-scrollbar.lua @@ -0,0 +1,15 @@ +return { + 'petertriho/nvim-scrollbar', + dependencies = { + 'lewis6991/gitsigns.nvim', + 'kevinhwang91/nvim-hlslens', + }, + config = function() + require 'gitsigns' + require('scrollbar').setup() + require('scrollbar.handlers.gitsigns').setup() + require('scrollbar.handlers.search').setup { + -- hlslens config overrides + } + end, +} diff --git a/lua/custom/plugins/nvim-toggleterm.lua b/lua/custom/plugins/nvim-toggleterm.lua new file mode 100644 index 00000000000..c45501b8bc6 --- /dev/null +++ b/lua/custom/plugins/nvim-toggleterm.lua @@ -0,0 +1,15 @@ +return { + 'akinsho/toggleterm.nvim', + version = '*', + config = true, + -- opts = {--[[ things you want to change go here]] }, + keys = { + { 'tt', 'ToggleTerm', desc = 'ToggleTerm' }, + { '', 'ToggleTerm', mode = 'n', desc = 'ToggleTerm' }, + { '', 'ToggleTerm', mode = 't', desc = 'ToggleTerm' }, + { '', 'ToggleTerm', mode = 'n', desc = 'ToggleTerm' }, + { '', 'ToggleTerm', mode = 't', desc = 'ToggleTerm' }, + -- vim.keymap.set('t', '', '', { desc = 'Exit terminal mode' }) + -- vim.keymap.set('t', '', '', { desc = 'Exit terminal mode' }) + }, +} diff --git a/lua/custom/plugins/undotree.lua b/lua/custom/plugins/undotree.lua new file mode 100644 index 00000000000..fb67c4b7dfb --- /dev/null +++ b/lua/custom/plugins/undotree.lua @@ -0,0 +1,8 @@ +return { + { + 'mbbill/undotree', + config = function() + vim.keymap.set('n', '', vim.cmd.UndotreeToggle, { desc = 'UndotreeToggle' }) + end, + }, +} diff --git a/lua/custom/plugins/vim-dadbod-ui.lua b/lua/custom/plugins/vim-dadbod-ui.lua new file mode 100644 index 00000000000..de850af86f7 --- /dev/null +++ b/lua/custom/plugins/vim-dadbod-ui.lua @@ -0,0 +1,17 @@ +return { + 'kristijanhusak/vim-dadbod-ui', + dependencies = { + { 'tpope/vim-dadbod', lazy = true }, + { 'kristijanhusak/vim-dadbod-completion', ft = { 'sql', 'mysql', 'plsql' }, lazy = true }, + }, + cmd = { + 'DBUI', + 'DBUIToggle', + 'DBUIAddConnection', + 'DBUIFindBuffer', + }, + init = function() + -- Your DBUI configuration + vim.g.db_ui_use_nerd_fonts = 1 + end, +} diff --git a/lua/custom/plugins/vim-dotenv.lua b/lua/custom/plugins/vim-dotenv.lua new file mode 100644 index 00000000000..71cf9010a7a --- /dev/null +++ b/lua/custom/plugins/vim-dotenv.lua @@ -0,0 +1 @@ +return { 'tpope/vim-dotenv' } diff --git a/lua/custom/plugins/vim-fugitive.lua b/lua/custom/plugins/vim-fugitive.lua new file mode 100644 index 00000000000..b6b4c97bc32 --- /dev/null +++ b/lua/custom/plugins/vim-fugitive.lua @@ -0,0 +1,3 @@ +return { + 'tpope/vim-fugitive', +} diff --git a/lua/custom/plugins/vim-signature.lua b/lua/custom/plugins/vim-signature.lua new file mode 100644 index 00000000000..f210c433583 --- /dev/null +++ b/lua/custom/plugins/vim-signature.lua @@ -0,0 +1,3 @@ +return { + 'kshenoy/vim-signature', +} diff --git a/lua/custom/plugins/vim-signify.lua b/lua/custom/plugins/vim-signify.lua new file mode 100644 index 00000000000..6974eda2657 --- /dev/null +++ b/lua/custom/plugins/vim-signify.lua @@ -0,0 +1,3 @@ +return { + 'mhinz/vim-signify', +} diff --git a/lua/custom/plugins/wakatime.lua b/lua/custom/plugins/wakatime.lua new file mode 100644 index 00000000000..89df0940720 --- /dev/null +++ b/lua/custom/plugins/wakatime.lua @@ -0,0 +1 @@ +return { 'wakatime/vim-wakatime', lazy = false } diff --git a/lua/kickstart/plugins/debug.lua b/lua/kickstart/plugins/debug.lua index 8e332bf2ff9..6d235e6ddd4 100644 --- a/lua/kickstart/plugins/debug.lua +++ b/lua/kickstart/plugins/debug.lua @@ -80,6 +80,20 @@ return { config = function() local dap = require 'dap' local dapui = require 'dapui' + dap.adapters.godot = { + type = 'server', + host = '127.0.0.1', + port = 6006, + } + + dap.configurations.gdscript = { + { + type = 'godot', + request = 'launch', + name = 'Launch scene', + project = '${workspaceFolder}', + }, + } require('mason-nvim-dap').setup { -- Makes a best effort to setup the various debuggers with diff --git a/lua/kickstart/plugins/gitsigns.lua b/lua/kickstart/plugins/gitsigns.lua index cbbd22d24fc..cbd4ccbf410 100644 --- a/lua/kickstart/plugins/gitsigns.lua +++ b/lua/kickstart/plugins/gitsigns.lua @@ -6,6 +6,14 @@ return { { 'lewis6991/gitsigns.nvim', opts = { + current_line_blame_opts = { + virt_text = true, + virt_text_pos = 'eol', -- 'eol' | 'overlay' | 'right_align' + delay = 10, + ignore_whitespace = false, + virt_text_priority = 100, + use_focus = true, + }, on_attach = function(bufnr) local gitsigns = require 'gitsigns' diff --git a/lua/kickstart/plugins/neo-tree.lua b/lua/kickstart/plugins/neo-tree.lua index c7067891df0..b550374f787 100644 --- a/lua/kickstart/plugins/neo-tree.lua +++ b/lua/kickstart/plugins/neo-tree.lua @@ -20,6 +20,17 @@ return { ['\\'] = 'close_window', }, }, + filtered_items = { + hide_by_pattern = { -- uses glob style patterns + '*.uid', + '*.tscn', + '*.scn', + '*.tres', + '*.res', + '*.meta', + --"*/src/*/tsconfig.json", + }, + }, }, }, } From 6e7241de79ee44d56afb3352e99fb5773537a464 Mon Sep 17 00:00:00 2001 From: Dino Date: Thu, 14 May 2026 12:13:33 +0300 Subject: [PATCH 2/2] Add cloude code --- lua/custom/plugins/nvim-claudecode.lua | 23 +++++++++++++++++++++++ queries/markdown/injections.scm | 25 +++++++++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 lua/custom/plugins/nvim-claudecode.lua create mode 100644 queries/markdown/injections.scm diff --git a/lua/custom/plugins/nvim-claudecode.lua b/lua/custom/plugins/nvim-claudecode.lua new file mode 100644 index 00000000000..8e353c51bf9 --- /dev/null +++ b/lua/custom/plugins/nvim-claudecode.lua @@ -0,0 +1,23 @@ +return { + 'coder/claudecode.nvim', + dependencies = { 'folke/snacks.nvim' }, + config = true, + keys = { + { 'a', nil, desc = 'AI/Claude Code' }, + { 'ac', 'ClaudeCode', desc = 'Toggle Claude' }, + { 'af', 'ClaudeCodeFocus', desc = 'Focus Claude' }, + { 'ar', 'ClaudeCode --resume', desc = 'Resume Claude' }, + { 'aC', 'ClaudeCode --continue', desc = 'Continue Claude' }, + { 'am', 'ClaudeCodeSelectModel', desc = 'Select Claude model' }, + { 'ab', 'ClaudeCodeAdd %', desc = 'Add current buffer' }, + { 'as', 'ClaudeCodeSend', mode = 'v', desc = 'Send to Claude' }, + { + 'as', + 'ClaudeCodeTreeAdd', + desc = 'Add file', + ft = { 'NvimTree', 'neo-tree', 'oil', 'minifiles', 'netrw' }, + }, + { 'aa', 'ClaudeCodeDiffAccept', desc = 'Accept diff' }, + { 'ad', 'ClaudeCodeDiffDeny', desc = 'Deny diff' }, + }, +} diff --git a/queries/markdown/injections.scm b/queries/markdown/injections.scm new file mode 100644 index 00000000000..1f33c30b633 --- /dev/null +++ b/queries/markdown/injections.scm @@ -0,0 +1,25 @@ +(fenced_code_block + (info_string + (language) @injection.language) + (code_fence_content) @injection.content) + +((html_block) @injection.content + (#set! injection.language "html") + (#set! injection.combined) + (#set! injection.include-children)) + +((minus_metadata) @injection.content + (#set! injection.language "yaml") + (#offset! @injection.content 1 0 -1 0) + (#set! injection.include-children)) + +((plus_metadata) @injection.content + (#set! injection.language "toml") + (#offset! @injection.content 1 0 -1 0) + (#set! injection.include-children)) + +([ + (inline) + (pipe_table_cell) +] @injection.content + (#set! injection.language "markdown_inline"))