rework keymaps and plugin config
- Change leader from space to comma - Move opencode keymaps into plugin config - Move picker keymaps from <leader>p to <leader>f - Change buffer delete mapping from bd to bk - Add DAP debugging keymaps and dap-view - Remove zk-nvim, checkmate plugins - Add claude-code, conjure, scnvim plugins - Update LSP servers: replace basedpyright with ty, add gopls/clojure_lsp/harper_ls/tinymist - Enable inlay hints on LspAttach - Enable go/sql/typst tree-sitter - Add htmlhint formatter - Configure opencode with snacks terminal
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"plugins": {
|
||||
"scnvim": {
|
||||
"rev": "876732590ef3f409c9705f3659fa1061db2dc7bf",
|
||||
"src": "https://github.com/davidgranstrom/scnvim"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -16,7 +16,7 @@
|
||||
-- reading. Consider preserving this or remove `-- stylua` lines to autoformat.
|
||||
|
||||
-- General ====================================================================
|
||||
vim.g.mapleader = ' ' -- Use `<Space>` as <Leader> key
|
||||
vim.g.mapleader = ',' -- Use comma as <Leader> key
|
||||
|
||||
vim.o.mouse = 'a' -- Enable mouse
|
||||
vim.o.mousescroll = 'ver:25,hor:6' -- Customize mouse scroll
|
||||
|
||||
+50
-74
@@ -14,13 +14,6 @@ local nmap = function(lhs, rhs, desc)
|
||||
vim.keymap.set('n', lhs, rhs, { desc = desc })
|
||||
end
|
||||
|
||||
-- Paste linewise before/after current line
|
||||
-- Usage: `yiw` to yank a word and `]p` to put it on the next line.
|
||||
nmap('[p', '<Cmd>exe "put! " . v:register<CR>', 'Paste Above')
|
||||
nmap(']p', '<Cmd>exe "put " . v:register<CR>', 'Paste Below')
|
||||
|
||||
-- Many general mappings are created by 'mini.basics'. See 'plugin/30_mini.lua'
|
||||
|
||||
-- stylua: ignore start
|
||||
-- The next part (until `-- stylua: ignore end`) is aligned manually for easier
|
||||
-- reading. Consider preserving this or remove `-- stylua` lines to autoformat.
|
||||
@@ -38,10 +31,9 @@ nmap(']p', '<Cmd>exe "put " . v:register<CR>', 'Paste Below')
|
||||
-- This is used to provide 'mini.clue' with extra clues.
|
||||
-- Add an entry if you create a new group.
|
||||
_G.Config.leader_group_clues = {
|
||||
{ mode = 'n', keys = '<Leader>a', desc = '+AI' },
|
||||
{ mode = 'n', keys = '<Leader>b', desc = '+Buffer' },
|
||||
{ mode = 'n', keys = '<Leader>e', desc = '+Explore/Edit' },
|
||||
{ mode = 'n', keys = '<Leader>p', desc = '+Pick' },
|
||||
{ mode = 'n', keys = '<Leader>f', desc = '+Pick' },
|
||||
{ mode = 'n', keys = '<Leader>g', desc = '+Git' },
|
||||
{ mode = 'n', keys = '<Leader>l', desc = '+Language' },
|
||||
{ mode = 'n', keys = '<Leader>m', desc = '+Map' },
|
||||
@@ -68,12 +60,6 @@ local vmap_leader = function(suffix, rhs, desc)
|
||||
vim.keymap.set('v', '<Leader>' .. suffix, rhs, { desc = desc })
|
||||
end
|
||||
|
||||
-- a is for 'AI'
|
||||
|
||||
nmap_leader('ac', ':lua require("opencode").toggle()<CR>', 'Toggle Opencode')
|
||||
nmap_leader('af', ':lua require("opencode").select()<CR>', 'Execute Opencode action...')
|
||||
nmap_leader('aa', ':luat require("opencode").ask("@this: ", { submit = true })', 'Ask Opencode')
|
||||
|
||||
-- b is for 'Buffer'. Common usage:
|
||||
-- - `<Leader>bs` - create scratch (temporary) buffer
|
||||
-- - `<Leader>ba` - navigate to the alternative buffer
|
||||
@@ -82,11 +68,11 @@ local new_scratch_buffer = function()
|
||||
vim.api.nvim_win_set_buf(0, vim.api.nvim_create_buf(true, true))
|
||||
end
|
||||
|
||||
nmap_leader('ba', '<Cmd>b#<CR>', 'Alternate')
|
||||
nmap_leader('bd', '<Cmd>lua MiniBufremove.delete()<CR>', 'Delete')
|
||||
nmap_leader('bD', '<Cmd>lua MiniBufremove.delete(0, true)<CR>', 'Delete!')
|
||||
nmap_leader('bs', new_scratch_buffer, 'Scratch')
|
||||
nmap_leader('bw', '<Cmd>write<CR>', 'Write')
|
||||
nmap_leader('ba', '<Cmd>b#<CR>', 'Alternate')
|
||||
nmap_leader('bk', '<Cmd>lua MiniBufremove.delete()<CR>', 'Kill')
|
||||
nmap_leader('bK', '<Cmd>lua MiniBufremove.delete(0, true)<CR>', 'KIIIILLL!')
|
||||
nmap_leader('bs', new_scratch_buffer, 'Scratch')
|
||||
nmap_leader('bw', '<Cmd>write<CR>', 'Write')
|
||||
|
||||
-- e is for 'Explore' and 'Edit'. Common usage:
|
||||
-- - `<Leader>ed` - open explorer at current working directory
|
||||
@@ -104,15 +90,15 @@ local explore_quickfix = function()
|
||||
vim.cmd('copen')
|
||||
end
|
||||
|
||||
nmap_leader('ed', '<Cmd>lua MiniFiles.open()<CR>', 'Directory')
|
||||
nmap_leader('ef', explore_at_file, 'File directory')
|
||||
nmap_leader('ei', '<Cmd>edit $MYVIMRC<CR>', 'init.lua')
|
||||
nmap_leader('ek', edit_plugin_file('20_keymaps.lua'), 'Keymaps config')
|
||||
nmap_leader('em', edit_plugin_file('30_mini.lua'), 'MINI config')
|
||||
nmap_leader('ed', '<Cmd>lua MiniFiles.open()<CR>', 'Directory')
|
||||
nmap_leader('ef', explore_at_file, 'File directory')
|
||||
nmap_leader('ei', '<Cmd>edit $MYVIMRC<CR>', 'init.lua')
|
||||
nmap_leader('ek', edit_plugin_file('20_keymaps.lua'), 'Keymaps config')
|
||||
nmap_leader('em', edit_plugin_file('30_mini.lua'), 'MINI config')
|
||||
nmap_leader('en', '<Cmd>lua MiniNotify.show_history()<CR>', 'Notifications')
|
||||
nmap_leader('eo', edit_plugin_file('10_options.lua'), 'Options config')
|
||||
nmap_leader('ep', edit_plugin_file('40_plugins.lua'), 'Plugins config')
|
||||
nmap_leader('eq', explore_quickfix, 'Quickfix')
|
||||
nmap_leader('eo', edit_plugin_file('10_options.lua'), 'Options config')
|
||||
nmap_leader('ep', edit_plugin_file('40_plugins.lua'), 'Plugins config')
|
||||
nmap_leader('eq', explore_quickfix, 'Quickfix')
|
||||
|
||||
-- f is for 'Fuzzy Find'. Common usage:
|
||||
-- - `<Leader>ff` - find files; for best performance requires `ripgrep`
|
||||
@@ -124,24 +110,23 @@ nmap_leader('eq', explore_quickfix, 'Quickfix')
|
||||
-- All these use 'mini.pick'. See `:h MiniPick-overview` for an overview.
|
||||
local pick_workspace_symbols_live = '<Cmd>Pick lsp scope="workspace_symbol_live"<CR>'
|
||||
|
||||
nmap_leader('p/', '<Cmd>Pick history scope="/"<CR>', '"/" history')
|
||||
nmap_leader('p:', '<Cmd>Pick history scope=":"<CR>', '":" history')
|
||||
nmap_leader('pb', '<Cmd>Pick buffers<CR>', 'Buffers')
|
||||
nmap_leader('pd', '<Cmd>Pick diagnostic scope="all"<CR>', 'Diagnostic workspace')
|
||||
nmap_leader('pD', '<Cmd>Pick diagnostic scope="current"<CR>', 'Diagnostic buffer')
|
||||
nmap_leader('pf', '<Cmd>Pick files<CR>', 'Files')
|
||||
nmap_leader('pg', '<Cmd>Pick grep_live<CR>', 'Grep live')
|
||||
nmap_leader('pG', '<Cmd>Pick grep pattern="<cword>"<CR>', 'Grep current word')
|
||||
nmap_leader('ph', '<Cmd>Pick help<CR>', 'Help tags')
|
||||
nmap_leader('pH', '<Cmd>Pick hl_groups<CR>', 'Highlight groups')
|
||||
nmap_leader('pl', '<Cmd>Pick buf_lines scope="all"<CR>', 'Lines (all)')
|
||||
nmap_leader('pL', '<Cmd>Pick buf_lines scope="current"<CR>', 'Lines (buf)')
|
||||
nmap_leader('pr', '<Cmd>Pick resume<CR>', 'Resume')
|
||||
nmap_leader('pR', '<Cmd>Pick lsp scope="references"<CR>', 'References (LSP)')
|
||||
nmap_leader('ps', pick_workspace_symbols_live, 'Symbols workspace (live)')
|
||||
nmap_leader('pS', '<Cmd>Pick lsp scope="document_symbol"<CR>', 'Symbols document')
|
||||
nmap_leader('pv', '<Cmd>Pick visit_paths cwd=""<CR>', 'Visit paths (all)')
|
||||
nmap_leader('pV', '<Cmd>Pick visit_paths<CR>', 'Visit paths (cwd)')
|
||||
nmap_leader('f/', '<Cmd>Pick history scope="/"<CR>', '"/" history')
|
||||
nmap_leader('f:', '<Cmd>Pick history scope=":"<CR>', '":" history')
|
||||
nmap_leader('<space>', '<Cmd>Pick buffers<CR>', 'Buffers')
|
||||
nmap_leader('w', '<Cmd>w!<CR>', 'Write buffer')
|
||||
nmap_leader('fd', '<Cmd>Pick diagnostic scope="all"<CR>', 'Diagnostic workspace')
|
||||
nmap_leader('fD', '<Cmd>Pick diagnostic scope="current"<CR>', 'Diagnostic buffer')
|
||||
nmap_leader('ff', '<Cmd>Pick files<CR>', 'Files')
|
||||
nmap_leader('fg', '<Cmd>Pick grep_live<CR>', 'Grep live')
|
||||
nmap_leader('fG', '<Cmd>Pick grep pattern="<cword>"<CR>', 'Grep current word')
|
||||
nmap_leader('fh', '<Cmd>Pick help<CR>', 'Help tags')
|
||||
nmap_leader('fH', '<Cmd>Pick hl_groups<CR>', 'Highlight groups')
|
||||
nmap_leader('fl', '<Cmd>Pick buf_lines scope="all"<CR>', 'Lines (all)')
|
||||
nmap_leader('fL', '<Cmd>Pick buf_lines scope="current"<CR>', 'Lines (buf)')
|
||||
nmap_leader('fr', '<Cmd>Pick resume<CR>', 'Resume')
|
||||
nmap_leader('fR', '<Cmd>Pick lsp scope="references"<CR>', 'References (LSP)')
|
||||
nmap_leader('fs', pick_workspace_symbols_live, 'Symbols workspace (live)')
|
||||
nmap_leader('fS', '<Cmd>Pick lsp scope="document_symbol"<CR>', 'Symbols document')
|
||||
|
||||
-- g is for Git
|
||||
nmap_leader('gg', '<Cmd>Neogit<CR>', 'Open neogit')
|
||||
@@ -152,39 +137,30 @@ nmap_leader('gb', '<Cmd>Gitsigns toggle_current_line_blame<CR>', 'Git blame')
|
||||
-- - `<Leader>ld` - show more diagnostic details in a floating window
|
||||
-- - `<Leader>lr` - perform rename via LSP
|
||||
-- - `<Leader>ls` - navigate to source definition of symbol under cursor
|
||||
--
|
||||
-- NOTE: most LSP mappings represent a more structured way of replacing built-in
|
||||
-- LSP mappings (like `:h gra` and others). This is needed because `gr` is mapped
|
||||
-- by an "replace" operator in 'mini.operators' (which is more commonly used).
|
||||
local formatting_cmd = '<Cmd>lua require("conform").format({lsp_fallback=true})<CR>'
|
||||
|
||||
nmap_leader('la', '<Cmd>lua vim.lsp.buf.code_action()<CR>', 'Actions')
|
||||
nmap_leader('ld', '<Cmd>lua vim.diagnostic.open_float()<CR>', 'Diagnostic popup')
|
||||
nmap_leader('lf', formatting_cmd, 'Format')
|
||||
nmap_leader('li', '<Cmd>lua vim.lsp.buf.implementation()<CR>', 'Implementation')
|
||||
nmap_leader('lh', '<Cmd>lua vim.lsp.buf.hover()<CR>', 'Hover')
|
||||
nmap_leader('lr', '<Cmd>lua vim.lsp.buf.rename()<CR>', 'Rename')
|
||||
nmap_leader('lR', '<Cmd>lua vim.lsp.buf.references()<CR>', 'References')
|
||||
nmap_leader('ls', '<Cmd>lua vim.lsp.buf.definition()<CR>', 'Source definition')
|
||||
nmap_leader('la', '<Cmd>lua vim.lsp.buf.code_action()<CR>', 'Actions')
|
||||
nmap_leader('ld', '<Cmd>lua vim.diagnostic.open_float()<CR>', 'Diagnostic popup')
|
||||
nmap_leader('lf', '<Cmd>lua vim.lsp.buf.format()<CR>', 'Format')
|
||||
nmap_leader('li', '<Cmd>lua vim.lsp.buf.implementation()<CR>', 'Implementation')
|
||||
nmap_leader('lh', '<Cmd>lua vim.lsp.buf.hover()<CR>', 'Hover')
|
||||
nmap_leader('lr', '<Cmd>lua vim.lsp.buf.rename()<CR>', 'Rename')
|
||||
nmap_leader('lR', '<Cmd>lua vim.lsp.buf.references()<CR>', 'References')
|
||||
nmap_leader('ls', '<Cmd>lua vim.lsp.buf.definition()<CR>', 'Source definition')
|
||||
nmap_leader('lt', '<Cmd>lua vim.lsp.buf.type_definition()<CR>', 'Type definition')
|
||||
|
||||
xmap_leader('lf', formatting_cmd, 'Format selection')
|
||||
-- d is for DAP Debugging
|
||||
nmap_leader('dd', '<Cmd>DapViewToggle<CR>', 'Open DAP')
|
||||
nmap_leader('ds', '<Cmd:>DapContinue<CR>', 'Start or Continue')
|
||||
nmap_leader('db', '<Cmd:>DapToggleBreakpoint<CR>', 'Toggle Breakpoint')
|
||||
nmap_leader('di', '<Cmd:>DapStepInto<CR>', 'Toggle Breakpoint')
|
||||
nmap_leader('db', '<Cmd:>DapToggleBreakpoint<CR>', 'Toggle Breakpoint')
|
||||
|
||||
-- o is for 'Other'. Common usage:
|
||||
-- - `<Leader>oz` - toggle between "zoomed" and regular view of current buffer
|
||||
nmap_leader('or', '<Cmd>lua MiniMisc.resize_window()<CR>', 'Resize to default width')
|
||||
nmap_leader('ot', '<Cmd>lua MiniTrailspace.trim()<CR>', 'Trim trailspace')
|
||||
nmap_leader('oz', '<Cmd>lua MiniMisc.zoom()<CR>', 'Zoom toggle')
|
||||
nmap_leader('om', '<Cmd>Mason<CR>', 'Open Mason')
|
||||
nmap_leader('ou', '<Cmd>DepsUpdate<CR>', 'Update plugins')
|
||||
|
||||
|
||||
-- z if for notes and todos
|
||||
nmap_leader('zz', "<Cmd>ZkNotes {sort={'modified'}}<CR>", 'Notes picker')
|
||||
nmap_leader('zn', "<Cmd>ZkNew {title = vim.fn.input('Title: ')}<CR>", 'New note')
|
||||
nmap_leader('zt', "<Cmd>ZkTags<CR>", 'Notes tags')
|
||||
nmap_leader('zf', "<Cmd>ZkNotes {sort={'modified'}, match={vim.fn.input('Search: ')}}<CR>", 'Search')
|
||||
vmap_leader('zm', "<Cmd>'<,'>ZkMatch<CR>", "Search match")
|
||||
nmap_leader('zt', "<Cmd>e ~/notes/TODO.md<CR>", "Open TODOs")
|
||||
nmap_leader('ot', '<Cmd>lua MiniTrailspace.trim()<CR>', 'Trim trailspace')
|
||||
nmap_leader('oz', '<Cmd>lua MiniMisc.zoom()<CR>', 'Zoom toggle')
|
||||
nmap_leader('om', '<Cmd>Mason<CR>', 'Open Mason')
|
||||
nmap_leader('ou', '<Cmd>DepsUpdate<CR>', 'Update plugins')
|
||||
nmap_leader('or', '<Cmd>Pick registers<CR>', 'Yank from register')
|
||||
|
||||
-- stylua: ignore end
|
||||
|
||||
+141
-95
@@ -13,11 +13,6 @@ local add, later = MiniDeps.add, MiniDeps.later
|
||||
local now_if_args = _G.Config.now_if_args
|
||||
|
||||
-- Tree-sitter ================================================================
|
||||
|
||||
-- Tree-sitter is a tool for fast incremental parsing. It converts text into
|
||||
-- a hierarchical structure (called tree) that can be used to implement advanced
|
||||
-- and/or more precise actions: syntax highlighting, textobjects, indent, etc.
|
||||
--
|
||||
now_if_args(function()
|
||||
add({
|
||||
source = 'nvim-treesitter/nvim-treesitter',
|
||||
@@ -43,6 +38,9 @@ now_if_args(function()
|
||||
'python',
|
||||
'javascript',
|
||||
'typst',
|
||||
'go',
|
||||
'sql',
|
||||
'typst',
|
||||
-- Add here more languages with which you want to use tree-sitter
|
||||
-- To see available languages:
|
||||
-- - Execute `:=require('nvim-treesitter').get_available()`
|
||||
@@ -67,52 +65,42 @@ now_if_args(function()
|
||||
end)
|
||||
|
||||
-- Language servers ===========================================================
|
||||
|
||||
-- Language Server Protocol (LSP) is a set of conventions that power creation of
|
||||
-- language specific tools. It requires two parts:
|
||||
-- - Server - program that performs language specific computations.
|
||||
-- - Client - program that asks server for computations and shows results.
|
||||
--
|
||||
-- Add it now if file (and not 'mini.starter') is shown after startup.
|
||||
now_if_args(function()
|
||||
add('neovim/nvim-lspconfig')
|
||||
|
||||
-- Use `:h vim.lsp.enable()` to automatically enable language server based on
|
||||
-- the rules provided by 'nvim-lspconfig'.
|
||||
-- Use `:h vim.lsp.config()` or 'after/lsp/' directory to configure servers.
|
||||
-- Uncomment and tweak the following `vim.lsp.enable()` call to enable servers.
|
||||
vim.lsp.enable({
|
||||
'lua_ls',
|
||||
'basedpyright',
|
||||
'ty',
|
||||
'ruff',
|
||||
'html',
|
||||
'css',
|
||||
'toml',
|
||||
'marksman',
|
||||
'gopls',
|
||||
'clojure_lsp',
|
||||
'harper_ls',
|
||||
'tinymist'
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd('LspAttach', {
|
||||
callback = function(args)
|
||||
local client = assert(vim.lsp.get_client_by_id(args.data.client_id))
|
||||
if client.server_capabilities.inlayHintProvider then
|
||||
vim.lsp.inlay_hint.enable(true)
|
||||
end
|
||||
end,
|
||||
})
|
||||
end)
|
||||
|
||||
-- Formatting =================================================================
|
||||
|
||||
-- Programs dedicated to text formatting (a.k.a. formatters) are very useful.
|
||||
-- Neovim has built-in tools for text formatting (see `:h gq` and `:h 'formatprg'`).
|
||||
-- They can be used to configure external programs, but it might become tedious.
|
||||
--
|
||||
-- The 'stevearc/conform.nvim' plugin is a good and maintained solution for easier
|
||||
-- formatting setup.
|
||||
later(function()
|
||||
add('stevearc/conform.nvim')
|
||||
|
||||
-- See also:
|
||||
-- - `:h Conform`
|
||||
-- - `:h conform-options`
|
||||
-- - `:h conform-formatters`
|
||||
require('conform').setup({
|
||||
-- Map of filetype to formatters
|
||||
-- Make sure that necessary CLI tool is available
|
||||
formatters_by_ft = {
|
||||
lua = { 'stylua' },
|
||||
python = { 'ruff' },
|
||||
html = { 'htmlhint' },
|
||||
},
|
||||
})
|
||||
end)
|
||||
@@ -135,7 +123,7 @@ now_if_args(function()
|
||||
float = {
|
||||
transparent = true,
|
||||
},
|
||||
compile_path = vim.fn.stdpath "cache" .. "/catppuccin",
|
||||
compile_path = vim.fn.stdpath('cache') .. '/catppuccin',
|
||||
})
|
||||
vim.cmd('colorscheme catppuccin')
|
||||
end)
|
||||
@@ -157,88 +145,146 @@ later(function()
|
||||
require('gitsigns').setup({})
|
||||
end)
|
||||
|
||||
-- claudecode =================================================================
|
||||
-- later(function ()
|
||||
-- add({
|
||||
-- source = 'coder/claudecode.nvim',
|
||||
-- depends = { 'folke/snacks.nvim' },
|
||||
-- })
|
||||
-- require('claudecode').setup({})
|
||||
-- end)
|
||||
--
|
||||
-- open code ==================================================================
|
||||
-- opencode ===================================================================
|
||||
local opencode_cmd = "opencode --port"
|
||||
|
||||
later(function()
|
||||
add({
|
||||
source = 'nickjvandyke/opencode.nvim',
|
||||
depends = { 'folke/snacks.nvim' },
|
||||
})
|
||||
|
||||
vim.g.opencode_opts = {
|
||||
provider = {
|
||||
enabled = 'terminal',
|
||||
terminal = {
|
||||
width = math.floor(vim.o.columns * 0.5),
|
||||
},
|
||||
require('snacks').setup({ picker = { enabled = true } })
|
||||
|
||||
---@type snacks.terminal.Opts
|
||||
local snacks_terminal_opts = {
|
||||
win = {
|
||||
position = "right",
|
||||
enter = false,
|
||||
},
|
||||
}
|
||||
|
||||
-- Handle `opencode` events
|
||||
-- vim.api.nvim_create_autocmd('User', {
|
||||
-- pattern = 'OpencodeEvent:*', -- Optionally filter event types
|
||||
-- callback = function(args)
|
||||
-- ---@type opencode.cli.client.Event
|
||||
-- local event = args.data.event
|
||||
-- ---@type number
|
||||
-- local port = args.data.port
|
||||
--
|
||||
-- -- See the available event types and their properties
|
||||
-- vim.notify(vim.inspect(event))
|
||||
-- -- Do something useful
|
||||
-- if event.type == 'session.idle' then
|
||||
-- vim.notify('`opencode` finished responding')
|
||||
-- end
|
||||
-- end,
|
||||
-- })
|
||||
end)
|
||||
|
||||
-- zk =========================================================================
|
||||
later(function()
|
||||
add({
|
||||
source = 'zk-org/zk-nvim',
|
||||
})
|
||||
require('zk').setup({
|
||||
picker = 'minipick',
|
||||
enabled = 'snacks',
|
||||
lsp = {
|
||||
config = {
|
||||
name = 'zk',
|
||||
cmd = { 'zk', 'lsp' },
|
||||
filetypes = { 'markdown' },
|
||||
},
|
||||
---@type opencode.Opts
|
||||
vim.g.opencode_opts = {
|
||||
server = {
|
||||
start = function()
|
||||
require("snacks.terminal").open(opencode_cmd, snacks_terminal_opts)
|
||||
end,
|
||||
},
|
||||
auto_attach = {
|
||||
enabled = true,
|
||||
},
|
||||
})
|
||||
end)
|
||||
}
|
||||
|
||||
-- checkmate ====================================================================
|
||||
now_if_args(function()
|
||||
add({
|
||||
source = 'bngarren/checkmate.nvim',
|
||||
})
|
||||
require('checkmate').setup({
|
||||
files = { '/home/mds/notes/TODO.md' },
|
||||
})
|
||||
vim.keymap.set({ "n", "x" }, "<leader>aa", function()
|
||||
require("opencode").ask("@this: ", { submit = true })
|
||||
end, { desc = "Ask opencode" })
|
||||
|
||||
vim.keymap.set({ "n", "x" }, "<leader>ap", function()
|
||||
require("opencode").select()
|
||||
end, { desc = "Select opencode" })
|
||||
|
||||
vim.keymap.set({ "n", "t" }, "<leader>ac", function()
|
||||
require("snacks.terminal").toggle(opencode_cmd, snacks_terminal_opts)
|
||||
end, { desc = "Toggle opencode" })
|
||||
end)
|
||||
|
||||
-- render-markdown.nvim ========================================================
|
||||
now_if_args(function ()
|
||||
now_if_args(function()
|
||||
add({
|
||||
source = 'MeanderingProgrammer/render-markdown.nvim',
|
||||
})
|
||||
require('render-markdown').setup({
|
||||
enabled = true,
|
||||
file_types = {'markdown', 'vimwiki'},
|
||||
file_types = { 'markdown', 'vimwiki' },
|
||||
latex = { enabled = false }
|
||||
})
|
||||
end)
|
||||
|
||||
-- nvim-dap ====================================================================
|
||||
--
|
||||
later(function()
|
||||
add({
|
||||
source = 'mfussenegger/nvim-dap',
|
||||
depends = {
|
||||
'nvim-neotest/nvim-nio',
|
||||
'mfussenegger/nvim-dap-python',
|
||||
'theHamsta/nvim-dap-virtual-text',
|
||||
},
|
||||
})
|
||||
|
||||
add({
|
||||
source = 'igorlfs/nvim-dap-view',
|
||||
})
|
||||
|
||||
local dap = require('dap')
|
||||
local dap_view = require('dap-view')
|
||||
local dap_python = require('dap-python')
|
||||
|
||||
dap_view.setup({})
|
||||
require('nvim-dap-virtual-text').setup({
|
||||
commented = true, -- Show virtual text alongside comment
|
||||
})
|
||||
|
||||
dap_python.setup('python3')
|
||||
end)
|
||||
|
||||
-- claude code =================================================================
|
||||
now_if_args(function()
|
||||
add({
|
||||
source = "coder/claudecode.nvim",
|
||||
depends = { "folke/snacks.nvim" }
|
||||
})
|
||||
require("claudecode").setup()
|
||||
vim.keymap.set({ "n", "x" }, "<leader>co", "<cmd>ClaudeCode<cr>", { desc = "Open Claude Code" })
|
||||
end)
|
||||
|
||||
-- conjure =====================================================================
|
||||
later(function()
|
||||
add({
|
||||
source = 'Olical/conjure',
|
||||
})
|
||||
end
|
||||
)
|
||||
|
||||
-- Typst ========================================================================
|
||||
now_if_args(function()
|
||||
vim.keymap.set("n", "<leader>tt", "<cmd>LspTinymistExportPdf<cr>", { desc = "Export Typst to PDF" })
|
||||
end)
|
||||
|
||||
|
||||
-- Supercollider ===============================================================
|
||||
later(function()
|
||||
add({
|
||||
source = 'davidgranstrom/scnvim'
|
||||
})
|
||||
local scnvim = require("scnvim")
|
||||
local map = scnvim.map
|
||||
local map_expr = scnvim.map_expr
|
||||
|
||||
scnvim.setup({
|
||||
keymaps = {
|
||||
["<M-e>"] = map("editor.send_line", { "i", "n" }),
|
||||
["<C-e>"] = {
|
||||
map("editor.send_block", { "i", "n" }),
|
||||
map("editor.send_selection", "x"),
|
||||
},
|
||||
["<CR>"] = map("postwin.toggle"),
|
||||
["<M-CR>"] = map("postwin.toggle", "i"),
|
||||
["<M-L>"] = map("postwin.clear", { "n", "i" }),
|
||||
["<C-s>"] = map("signature.show", { "n", "i" }),
|
||||
["<C-.>"] = map("sclang.hard_stop", { "n", "x", "i" }),
|
||||
["<leader>st"] = map("sclang.start"),
|
||||
["<leader>sk"] = map("sclang.recompile"),
|
||||
["<F1>"] = map_expr("s.boot"),
|
||||
["<F2>"] = map_expr("s.meter"),
|
||||
},
|
||||
editor = {
|
||||
highlight = {
|
||||
color = "IncSearch",
|
||||
},
|
||||
},
|
||||
postwin = {
|
||||
float = {
|
||||
enabled = true,
|
||||
},
|
||||
},
|
||||
})
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user