Add opencode and notes/todo configuration
This commit is contained in:
+74
-14
@@ -35,7 +35,8 @@ now_if_args(function()
|
||||
local languages = {
|
||||
-- These are already pre-installed with Neovim. Used as an example.
|
||||
'lua',
|
||||
'vimdoc',
|
||||
'html',
|
||||
'css',
|
||||
'markdown',
|
||||
'yaml',
|
||||
'toml',
|
||||
@@ -84,6 +85,10 @@ now_if_args(function()
|
||||
'lua_ls',
|
||||
'basedpyright',
|
||||
'ruff',
|
||||
'html',
|
||||
'css',
|
||||
'toml',
|
||||
'marksman',
|
||||
})
|
||||
end)
|
||||
|
||||
@@ -105,9 +110,9 @@ later(function()
|
||||
require('conform').setup({
|
||||
-- Map of filetype to formatters
|
||||
-- Make sure that necessary CLI tool is available
|
||||
formatters_by_ft = {
|
||||
formatters_by_ft = {
|
||||
lua = { 'stylua' },
|
||||
python = { 'ruff' }
|
||||
python = { 'ruff' },
|
||||
},
|
||||
})
|
||||
end)
|
||||
@@ -120,7 +125,7 @@ end)
|
||||
|
||||
-- Catppuccin =================================================================
|
||||
now_if_args(function()
|
||||
add({ source = "catppuccin/nvim", name = "catppuccin" })
|
||||
add({ source = 'catppuccin/nvim', name = 'catppuccin' })
|
||||
require('catppuccin').setup({
|
||||
flavour = 'mocha',
|
||||
transparent_background = true,
|
||||
@@ -130,6 +135,7 @@ now_if_args(function()
|
||||
float = {
|
||||
transparent = true,
|
||||
},
|
||||
compile_path = vim.fn.stdpath "cache" .. "/catppuccin",
|
||||
})
|
||||
vim.cmd('colorscheme catppuccin')
|
||||
end)
|
||||
@@ -152,14 +158,48 @@ later(function()
|
||||
end)
|
||||
|
||||
-- claudecode =================================================================
|
||||
later(function ()
|
||||
-- later(function ()
|
||||
-- add({
|
||||
-- source = 'coder/claudecode.nvim',
|
||||
-- depends = { 'folke/snacks.nvim' },
|
||||
-- })
|
||||
-- require('claudecode').setup({})
|
||||
-- end)
|
||||
--
|
||||
-- open code ==================================================================
|
||||
later(function()
|
||||
add({
|
||||
source = 'coder/claudecode.nvim',
|
||||
source = 'nickjvandyke/opencode.nvim',
|
||||
depends = { 'folke/snacks.nvim' },
|
||||
})
|
||||
require('claudecode').setup({})
|
||||
end
|
||||
)
|
||||
|
||||
vim.g.opencode_opts = {
|
||||
provider = {
|
||||
enabled = 'terminal',
|
||||
terminal = {
|
||||
width = math.floor(vim.o.columns * 0.5),
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
-- 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()
|
||||
@@ -167,18 +207,38 @@ later(function()
|
||||
source = 'zk-org/zk-nvim',
|
||||
})
|
||||
require('zk').setup({
|
||||
picker = "minipick",
|
||||
picker = 'minipick',
|
||||
enabled = 'snacks',
|
||||
lsp = {
|
||||
config = {
|
||||
name = 'zk',
|
||||
cmd = {'zk', 'lsp' },
|
||||
cmd = { 'zk', 'lsp' },
|
||||
filetypes = { 'markdown' },
|
||||
},
|
||||
},
|
||||
auto_attach = {
|
||||
enabled = true,
|
||||
}
|
||||
},
|
||||
})
|
||||
end
|
||||
)
|
||||
end)
|
||||
|
||||
-- checkmate ====================================================================
|
||||
now_if_args(function()
|
||||
add({
|
||||
source = 'bngarren/checkmate.nvim',
|
||||
})
|
||||
require('checkmate').setup({
|
||||
files = { '/home/mds/notes/TODO.md' },
|
||||
})
|
||||
end)
|
||||
|
||||
-- render-markdown.nvim ========================================================
|
||||
now_if_args(function ()
|
||||
add({
|
||||
source = 'MeanderingProgrammer/render-markdown.nvim',
|
||||
})
|
||||
require('render-markdown').setup({
|
||||
enabled = true,
|
||||
file_types = {'markdown', 'vimwiki'},
|
||||
})
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user