Compare commits
2 Commits
3fc6fde51c
...
nvim-0.10
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
01480f98b5 | ||
|
|
37eb7073a1 |
@@ -5,8 +5,8 @@ local M = {}
|
|||||||
local highlights = require "custom.highlights"
|
local highlights = require "custom.highlights"
|
||||||
|
|
||||||
M.ui = {
|
M.ui = {
|
||||||
theme = "everblush",
|
theme = "chadracula",
|
||||||
theme_toggle = { "everblush", "one_light" },
|
theme_toggle = { "chadracula", "one_light" },
|
||||||
|
|
||||||
hl_override = highlights.override,
|
hl_override = highlights.override,
|
||||||
hl_add = highlights.add,
|
hl_add = highlights.add,
|
||||||
|
|||||||
43
lua/custom/configs/codecompanion.lua
Normal file
43
lua/custom/configs/codecompanion.lua
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
local options = {
|
||||||
|
adapters = {
|
||||||
|
ollama = function()
|
||||||
|
return require("codecompanion.adapters").extend("ollama", {
|
||||||
|
env = {
|
||||||
|
url = "http://axiom.bell:11434",
|
||||||
|
api_key = "ollama",
|
||||||
|
},
|
||||||
|
headers = {
|
||||||
|
["Content-Type"] = "application/json",
|
||||||
|
["Authorization"] = "Bearer ${api_key}",
|
||||||
|
},
|
||||||
|
parameters = {
|
||||||
|
sync = true,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
strategies = {
|
||||||
|
chat = {
|
||||||
|
adapter = "ollama",
|
||||||
|
},
|
||||||
|
inline = {
|
||||||
|
adapter = "ollama",
|
||||||
|
keymaps = {
|
||||||
|
accept_change = {
|
||||||
|
modes = { n = "ga" },
|
||||||
|
description = "Accept the suggested change",
|
||||||
|
},
|
||||||
|
reject_change = {
|
||||||
|
modes = { n = "gr" },
|
||||||
|
description = "Reject the suggested change",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
},
|
||||||
|
cmd = {
|
||||||
|
adapter = "ollama",
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
return options
|
||||||
38
lua/custom/configs/none-ls.lua
Normal file
38
lua/custom/configs/none-ls.lua
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
local null_ls = require("null-ls")
|
||||||
|
|
||||||
|
null_ls.setup({
|
||||||
|
sources = {
|
||||||
|
null_ls.builtins.formatting.stylua,
|
||||||
|
null_ls.builtins.completion.spell,
|
||||||
|
-- require("none-ls.diagnostics.eslint"), -- requires none-ls-extras.nvim
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
-- local augroup = vim.api.nvim_create_augroup("NoneLsFormatting", {})
|
||||||
|
--
|
||||||
|
-- local on_attach = function(client, bufnr)
|
||||||
|
-- if client.supports_method("textDocument/formatting") then
|
||||||
|
-- vim.api.nvim_clear_autocmds({ group = augroup, buffer = bufnr })
|
||||||
|
-- vim.api.nvim_create_autocmd("BufWritePre", {
|
||||||
|
-- group = augroup,
|
||||||
|
-- buffer = bufnr,
|
||||||
|
-- callback = function()
|
||||||
|
-- vim.lsp.buf.format({ bufnr = bufnr })
|
||||||
|
-- end,
|
||||||
|
-- })
|
||||||
|
-- end
|
||||||
|
-- end
|
||||||
|
--
|
||||||
|
-- local null_ls = require("null-ls")
|
||||||
|
--
|
||||||
|
-- null_ls.setup({
|
||||||
|
-- sources = {
|
||||||
|
-- null_ls.builtins.formatting.stylua,
|
||||||
|
-- null_ls.builtins.formatting.prettierd.with({
|
||||||
|
-- extra_args = { "--no-semi", "--single-quote", "--jsx-single-quote" },
|
||||||
|
-- }),
|
||||||
|
-- null_ls.builtins.diagnostics.mypy.with({ extra_args = { "--ignore-missing-imports" } }),
|
||||||
|
-- },
|
||||||
|
-- on_attach = on_attach,
|
||||||
|
-- })
|
||||||
|
--
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
local null_ls = require "null-ls"
|
|
||||||
|
|
||||||
local b = null_ls.builtins
|
|
||||||
|
|
||||||
local sources = {
|
|
||||||
|
|
||||||
-- webdev stuff
|
|
||||||
b.formatting.deno_fmt, -- choosed deno for ts/js files cuz its very fast!
|
|
||||||
b.formatting.prettier.with { filetypes = { "html", "markdown", "css" } }, -- so prettier works only on these filetypes
|
|
||||||
|
|
||||||
-- Lua
|
|
||||||
b.formatting.stylua,
|
|
||||||
|
|
||||||
-- cpp
|
|
||||||
b.formatting.clang_format,
|
|
||||||
}
|
|
||||||
|
|
||||||
null_ls.setup {
|
|
||||||
debug = true,
|
|
||||||
sources = sources,
|
|
||||||
}
|
|
||||||
@@ -5,17 +5,18 @@ local plugins = {
|
|||||||
|
|
||||||
-- Override plugin definition options
|
-- Override plugin definition options
|
||||||
|
|
||||||
|
{
|
||||||
|
"nvimtools/none-ls.nvim",
|
||||||
|
lazy = false,
|
||||||
|
config = function()
|
||||||
|
require "custom.configs.none-ls"
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
{
|
{
|
||||||
"neovim/nvim-lspconfig",
|
"neovim/nvim-lspconfig",
|
||||||
dependencies = {
|
dependencies = "nvimtools/none-ls.nvim",
|
||||||
-- format & linting
|
|
||||||
{
|
|
||||||
"jose-elias-alvarez/null-ls.nvim",
|
|
||||||
config = function()
|
|
||||||
require "custom.configs.null-ls"
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
config = function()
|
config = function()
|
||||||
require "plugins.configs.lspconfig"
|
require "plugins.configs.lspconfig"
|
||||||
require "custom.configs.lspconfig"
|
require "custom.configs.lspconfig"
|
||||||
@@ -40,9 +41,16 @@ local plugins = {
|
|||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
|
|
||||||
|
-- {
|
||||||
|
-- "nvim-treesitter/nvim-treesitter",
|
||||||
|
-- opts = overrides.treesitter,
|
||||||
|
-- },
|
||||||
{
|
{
|
||||||
"nvim-treesitter/nvim-treesitter",
|
"nvim-treesitter/nvim-treesitter",
|
||||||
opts = overrides.treesitter,
|
build = ":TSUpdate",
|
||||||
|
dependencies = {
|
||||||
|
"nvim-treesitter/nvim-treesitter-textobjects"
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
@@ -245,6 +253,87 @@ local plugins = {
|
|||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
-- {
|
||||||
|
-- "olimorris/codecompanion.nvim",
|
||||||
|
-- lazy = false,
|
||||||
|
-- dependencies = {
|
||||||
|
-- "nvim-lua/plenary.nvim",
|
||||||
|
-- "nvim-treesitter/nvim-treesitter",
|
||||||
|
-- },
|
||||||
|
-- opts = function()
|
||||||
|
-- return require "custom.configs.codecompanion"
|
||||||
|
-- end,
|
||||||
|
-- config = function(_, opts)
|
||||||
|
-- require("codecompanion").setup(opts)
|
||||||
|
-- end,
|
||||||
|
-- },
|
||||||
|
--
|
||||||
|
|
||||||
|
{
|
||||||
|
"yetone/avante.nvim",
|
||||||
|
event = "VeryLazy",
|
||||||
|
version = false, -- Never set this value to "*"! Never!
|
||||||
|
---@module 'avante'
|
||||||
|
---@type avante.Config
|
||||||
|
opts = {
|
||||||
|
-- add any opts here
|
||||||
|
-- for example
|
||||||
|
provider = "ollama",
|
||||||
|
providers = {
|
||||||
|
ollama = {
|
||||||
|
endpoint = "http://axiom.bell:11434",
|
||||||
|
-- model = "devstral:24b",
|
||||||
|
model = "qwen2.5-coder:32b",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
behavior = {
|
||||||
|
-- auto_apply_diff_after_generation = true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
-- if you want to build from source then do `make BUILD_FROM_SOURCE=true`
|
||||||
|
build = "make",
|
||||||
|
-- build = "powershell -ExecutionPolicy Bypass -File Build.ps1 -BuildFromSource false" -- for windows
|
||||||
|
dependencies = {
|
||||||
|
"nvim-treesitter/nvim-treesitter",
|
||||||
|
"nvim-lua/plenary.nvim",
|
||||||
|
"MunifTanjim/nui.nvim",
|
||||||
|
--- The below dependencies are optional,
|
||||||
|
"echasnovski/mini.pick", -- for file_selector provider mini.pick
|
||||||
|
"nvim-telescope/telescope.nvim", -- for file_selector provider telescope
|
||||||
|
"hrsh7th/nvim-cmp", -- autocompletion for avante commands and mentions
|
||||||
|
"ibhagwan/fzf-lua", -- for file_selector provider fzf
|
||||||
|
"stevearc/dressing.nvim", -- for input provider dressing
|
||||||
|
"folke/snacks.nvim", -- for input provider snacks
|
||||||
|
"nvim-tree/nvim-web-devicons", -- or echasnovski/mini.icons
|
||||||
|
-- "zbirenbaum/copilot.lua", -- for providers='copilot'
|
||||||
|
{
|
||||||
|
-- support for image pasting
|
||||||
|
"HakonHarnes/img-clip.nvim",
|
||||||
|
event = "VeryLazy",
|
||||||
|
opts = {
|
||||||
|
-- recommended settings
|
||||||
|
default = {
|
||||||
|
embed_image_as_base64 = false,
|
||||||
|
prompt_for_file_name = false,
|
||||||
|
drag_and_drop = {
|
||||||
|
insert_mode = true,
|
||||||
|
},
|
||||||
|
-- required for Windows users
|
||||||
|
use_absolute_path = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
-- Make sure to set this up properly if you have lazy=true
|
||||||
|
'MeanderingProgrammer/render-markdown.nvim',
|
||||||
|
opts = {
|
||||||
|
file_types = { "markdown", "Avante" },
|
||||||
|
},
|
||||||
|
ft = { "markdown", "Avante" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
-- {
|
-- {
|
||||||
-- "rouge8/neotest-rust",
|
-- "rouge8/neotest-rust",
|
||||||
-- config = function() end,
|
-- config = function() end,
|
||||||
|
|||||||
@@ -16,9 +16,9 @@ M.on_attach = function(client, bufnr)
|
|||||||
require("nvchad.signature").setup(client)
|
require("nvchad.signature").setup(client)
|
||||||
end
|
end
|
||||||
|
|
||||||
if not utils.load_config().ui.lsp_semantic_tokens and client.supports_method "textDocument/semanticTokens" then
|
-- if not utils.load_config().ui.lsp_semantic_tokens and client.supports_method "textDocument/semanticTokens" then
|
||||||
client.server_capabilities.semanticTokensProvider = nil
|
-- client.server_capabilities.semanticTokensProvider = nil
|
||||||
end
|
-- end
|
||||||
end
|
end
|
||||||
|
|
||||||
M.capabilities = vim.lsp.protocol.make_client_capabilities()
|
M.capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
local options = {
|
local options = {
|
||||||
ensure_installed = { "lua" },
|
ensure_installed = { "lua", "elixir" },
|
||||||
|
|
||||||
highlight = {
|
highlight = {
|
||||||
enable = true,
|
enable = true,
|
||||||
@@ -7,6 +7,19 @@ local options = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
indent = { enable = true },
|
indent = { enable = true },
|
||||||
|
|
||||||
|
textobjects = {
|
||||||
|
select = {
|
||||||
|
enable = true,
|
||||||
|
lookahead = true,
|
||||||
|
keymaps = {
|
||||||
|
-- custom mappings (example)
|
||||||
|
["ad"] = "@block.outer", -- around do...end
|
||||||
|
["id"] = "@block.inner", -- inside do...end
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return options
|
return options
|
||||||
|
|||||||
Reference in New Issue
Block a user