This commit is contained in:
2026-01-21 17:25:34 +11:00
parent e0046ccf1a
commit 7433ea1af1
7 changed files with 115 additions and 62 deletions

9
lua/plugins/blink.lua Normal file
View File

@@ -0,0 +1,9 @@
return {
"saghen/blink.cmp",
opts = {
keymap = {
["<CR>"] = { "fallback" },
["<C-y>"] = { "accept", "fallback" },
},
},
}

View File

@@ -0,0 +1,47 @@
return {
"olimorris/codecompanion.nvim",
dependencies = {
"nvim-lua/plenary.nvim",
"nvim-treesitter/nvim-treesitter",
},
opts = {
log_level = "TRACE", -- or "TRACE"
interactions = {
chat = {
adapter = "opencode",
roles = {
---The header name for the LLM's messages
---@type string|fun(adapter: CodeCompanion.HTTPAdapter|CodeCompanion.ACPAdapter): string
llm = function(adapter)
return "CodeCompanion (" .. adapter.formatted_name .. ")"
end,
---The header name for your messages
---@type string
user = "Haelnorr",
},
},
inline = {
adapter = "anthropic",
},
},
rules = {
default = {
files = {
{ path = "RULES.md", parser = "claude" },
},
is_preset = true,
},
opts = {
chat = {
autoload = "default",
enabled = true,
},
},
},
},
keys = {
{ "<leader>ac", "<cmd>CodeCompanionChat Toggle<cr>", desc = "Toggle CodeCompanion Chat" },
{ "<leader>ai", "<cmd>CodeCompanion<cr>", mode = "v", desc = "Open CodeCompanion Inline" },
},
}

3
lua/plugins/extras.lua Normal file
View File

@@ -0,0 +1,3 @@
return {
{ import = "lazyvim.plugins.extras.coding.blink" },
}

View File

@@ -22,52 +22,35 @@ return {
},
{
"neovim/nvim-lspconfig",
event = "LazyFile",
opts = {
servers = {
templ = {
filetypes = { "templ" },
settings = {
templ = {
enable_snippets = true,
},
},
opts = function(_, opts)
local capabilities = require("blink-cmp").get_lsp_capabilities(vim.lsp.protocol.make_client_capabilities())
-- apply to ALL servers
opts.servers["*"].capabilities = capabilities
opts.servers = opts.servers or {}
opts.servers.templ = {
cmd = { "templ", "lsp" },
filetypes = { "templ" },
root_dir = require("lspconfig.util").root_pattern("go.work", "go.mod", ".git"),
capabilities = capabilities,
}
opts.servers.html = {
filetypes = { "html", "templ" },
capabilities = capabilities,
}
opts.servers.tailwindcss = {
filetypes = {
"html",
"templ",
"javascript",
"typescript",
"javascriptreact",
"typescriptreact",
},
},
},
},
{
"nvim-treesitter/nvim-treesitter",
event = { "LazyFile", "VeryLazy" },
opts_extend = { "ensure_installed" },
opts = {
highlight = { enable = true },
indent = { enable = true },
ensure_installed = {
"bash",
"c",
"diff",
"go",
"html",
"javascript",
"jsdoc",
"json",
"jsonc",
"lua",
"luadoc",
"luap",
"markdown",
"markdown_inline",
"printf",
"query",
"toml",
"vim",
"vimdoc",
"yaml",
"templ",
"typescript",
},
},
capabilities = capabilities,
}
end,
},
{
"stevearc/conform.nvim",

View File

@@ -0,0 +1,12 @@
return {
{
"rachartier/tiny-inline-diagnostic.nvim",
event = "VeryLazy",
priority = 1000,
opts = {},
},
{
"neovim/nvim-lspconfig",
opts = { diagnostics = { virtual_text = false } },
},
}