chore: adding more configurations
This commit is contained in:
@@ -94,6 +94,7 @@ keymap.set("n", "<leader>ld", "<cmd>Leet daily<CR>", { desc = "LeetCode: Daily C
|
||||
keymap.set("n", "<leader>ll", "<cmd>Leet list<CR>", { desc = "LeetCode: List Problems" })
|
||||
keymap.set("n", "<leader>lc", "<cmd>Leet console<CR>", { desc = "LeetCode: Open Console" })
|
||||
keymap.set("n", "<leader>lu", "<cmd>Leet cookie update<CR>", { desc = "LeetCode: Update Cookie" })
|
||||
keymap.set("n", "<leader>lls", "<cmd>Leet last_submit<CR>", { desc = "LeetCode: Get latest submition" })
|
||||
|
||||
-- Copilot
|
||||
-- Add key map on normal mode to open copilot panel on c + tab
|
||||
|
||||
56
lua/cargdev/plugins/aicargdev.lua.bak
Normal file
56
lua/cargdev/plugins/aicargdev.lua.bak
Normal file
@@ -0,0 +1,56 @@
|
||||
-- return {
|
||||
-- {
|
||||
-- "yetone/avante.nvim",
|
||||
-- event = "VeryLazy",
|
||||
-- lazy = false,
|
||||
-- version = false, -- Always pull the latest change
|
||||
-- opts = {
|
||||
-- provider = "cargdev", -- API provider configuration
|
||||
-- providers = {
|
||||
-- cargdev = {
|
||||
-- name = "cargdev", -- Optional
|
||||
-- endpoint = "https://api-ai.cargdev.io", -- API endpoint
|
||||
-- api_key_name = "CARGDEV_API_KEY", -- reference the ENV VAR below
|
||||
-- model = "deepseek-r1:latest",
|
||||
-- __inherited_from = "ollama", -- ensures compatibility
|
||||
-- max_tokens = 8192,
|
||||
-- },
|
||||
-- },
|
||||
-- },
|
||||
-- -- Optional: Build from source if required
|
||||
-- build = "make",
|
||||
-- dependencies = {
|
||||
-- "nvim-treesitter/nvim-treesitter", -- Syntax highlighting support
|
||||
-- "stevearc/dressing.nvim", -- UI elements
|
||||
-- "nvim-lua/plenary.nvim", -- Utility library
|
||||
-- "MunifTanjim/nui.nvim", -- UI library for modal components
|
||||
-- -- Optional dependencies:
|
||||
-- "nvim-tree/nvim-web-devicons", -- Icons support
|
||||
-- "zbirenbaum/copilot.lua", -- Copilot integration
|
||||
-- {
|
||||
-- "HakonHarnes/img-clip.nvim", -- Image pasting support
|
||||
-- event = "VeryLazy",
|
||||
-- opts = {
|
||||
-- -- Recommended settings
|
||||
-- default = {
|
||||
-- embed_image_as_base64 = false,
|
||||
-- prompt_for_file_name = false,
|
||||
-- drag_and_drop = {
|
||||
-- insert_mode = true,
|
||||
-- },
|
||||
-- use_absolute_path = true, -- For Windows users
|
||||
-- },
|
||||
-- },
|
||||
-- },
|
||||
-- {
|
||||
-- "MeanderingProgrammer/render-markdown.nvim",
|
||||
-- ft = { "markdown", "Avante" },
|
||||
-- config = function()
|
||||
-- require("render-markdown").setup({
|
||||
-- file_types = { "markdown", "Avante" },
|
||||
-- })
|
||||
-- end,
|
||||
-- },
|
||||
-- },
|
||||
-- },
|
||||
-- }
|
||||
@@ -5,28 +5,32 @@ return {
|
||||
lazy = false,
|
||||
version = false, -- Always pull the latest change
|
||||
opts = {
|
||||
provider = "cargdev", -- API provider configuration
|
||||
provider = "claude", -- API provider configuration
|
||||
providers = {
|
||||
cargdev = {
|
||||
name = "cargdev", -- Optional
|
||||
endpoint = "https://api-ai.cargdev.io", -- API endpoint
|
||||
api_key_name = "CARGDEV_API_KEY", -- reference the ENV VAR below
|
||||
model = "deepseek-r1:latest",
|
||||
__inherited_from = "ollama", -- ensures compatibility
|
||||
max_tokens = 8192,
|
||||
claude = {
|
||||
endpoint = "https://api.anthropic.com",
|
||||
model = "claude-3-haiku-20240307",
|
||||
timeout = 30000, -- Timeout in milliseconds
|
||||
extra_request_body = {
|
||||
temperature = 0.75,
|
||||
max_tokens = 4096,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
-- Optional: Build from source if required
|
||||
build = "make",
|
||||
dependencies = {
|
||||
"nvim-treesitter/nvim-treesitter", -- Syntax highlighting support
|
||||
"stevearc/dressing.nvim", -- UI elements
|
||||
"nvim-lua/plenary.nvim", -- Utility library
|
||||
"MunifTanjim/nui.nvim", -- UI library for modal components
|
||||
-- Optional dependencies:
|
||||
"nvim-tree/nvim-web-devicons", -- Icons support
|
||||
"zbirenbaum/copilot.lua", -- Copilot integration
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
"nvim-lua/plenary.nvim",
|
||||
"MunifTanjim/nui.nvim",
|
||||
"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
|
||||
{
|
||||
"HakonHarnes/img-clip.nvim", -- Image pasting support
|
||||
event = "VeryLazy",
|
||||
@@ -1,12 +0,0 @@
|
||||
-- return {
|
||||
-- "ap/vim-buftabline",
|
||||
-- event = "VeryLazy", -- Loads when Neovim starts up
|
||||
-- config = function()
|
||||
-- -- Enable the buffer tabline
|
||||
-- vim.g.buftabline_numbers = 2 -- Shows buffer numbers
|
||||
-- vim.g.buftabline_separators = 1 -- Shows separators between tabs
|
||||
-- vim.g.buftabline_indicators = 1 -- Show indicators for modified buffers
|
||||
-- vim.g.buftabline_show = 1 -- 0: never, 1: always, 2: auto-hide when only one buffer
|
||||
-- vim.g.buftabline_modified_indicator = "[+]" -- Custom indicator for modified buffers
|
||||
-- end,
|
||||
-- }
|
||||
@@ -23,7 +23,7 @@ return {
|
||||
},
|
||||
suggestion = {
|
||||
enabled = true,
|
||||
auto_trigger = false,
|
||||
auto_trigger = true,
|
||||
debounce = 75,
|
||||
trigger_on_accept = false,
|
||||
keymap = {
|
||||
@@ -54,6 +54,9 @@ return {
|
||||
position = "right", -- Position of the chat window
|
||||
ratio = 0.5,
|
||||
},
|
||||
tiktoken = {
|
||||
enabled = false, -- Enable token counting
|
||||
},
|
||||
floating = {
|
||||
enabled = true,
|
||||
border = "rounded",
|
||||
|
||||
@@ -5,7 +5,10 @@ return {
|
||||
"hrsh7th/cmp-nvim-lsp",
|
||||
{ "antosha417/nvim-lsp-file-operations", config = true },
|
||||
{ "folke/neodev.nvim", opts = {} },
|
||||
{ "pmizio/typescript-tools.nvim", dependencies = { "nvim-lua/plenary.nvim" } }
|
||||
{
|
||||
"pmizio/typescript-tools.nvim",
|
||||
dependencies = { "nvim-lua/plenary.nvim" },
|
||||
},
|
||||
},
|
||||
config = function()
|
||||
local lspconfig = require("lspconfig")
|
||||
@@ -21,31 +24,29 @@ return {
|
||||
"gopls",
|
||||
"graphql",
|
||||
"html",
|
||||
"jdtls",
|
||||
-- "jdtls", -- uncomment if you’re actively doing Java
|
||||
"lua_ls",
|
||||
"prismals",
|
||||
"pyright",
|
||||
"svelte",
|
||||
"tailwindcss",
|
||||
"ts_ls"
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
local capabilities = cmp_nvim_lsp.default_capabilities()
|
||||
|
||||
-- Define signs for diagnostics
|
||||
vim.diagnostic.config({
|
||||
signs = {
|
||||
severity = {
|
||||
min = vim.diagnostic.severity.WARN
|
||||
min = vim.diagnostic.severity.WARN,
|
||||
},
|
||||
icons = {
|
||||
Error = " ",
|
||||
Warn = " ",
|
||||
Hint = " ",
|
||||
Info = " "
|
||||
}
|
||||
}
|
||||
Info = " ",
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
local servers = {
|
||||
@@ -55,23 +56,22 @@ return {
|
||||
gopls = {},
|
||||
graphql = {},
|
||||
html = {},
|
||||
jdtls = {},
|
||||
-- jdtls = {}, -- same here
|
||||
lua_ls = {
|
||||
settings = {
|
||||
Lua = {
|
||||
diagnostics = { globals = { "vim" } },
|
||||
workspace = {
|
||||
library = vim.api.nvim_get_runtime_file("", true),
|
||||
checkThirdParty = false
|
||||
}
|
||||
}
|
||||
}
|
||||
checkThirdParty = false,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
prismals = {},
|
||||
pyright = {},
|
||||
svelte = {},
|
||||
tailwindcss = {},
|
||||
ts_ls = {}
|
||||
}
|
||||
|
||||
for server, config in pairs(servers) do
|
||||
@@ -79,6 +79,16 @@ return {
|
||||
lspconfig[server].setup(config)
|
||||
end
|
||||
|
||||
-- ✅ Correct way to setup typescript-tools
|
||||
require("typescript-tools").setup({
|
||||
capabilities = capabilities,
|
||||
-- optional settings:
|
||||
-- settings = {
|
||||
-- tsserver_plugins = {},
|
||||
-- tsserver_max_memory = 4096,
|
||||
-- }
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd("LspAttach", {
|
||||
group = vim.api.nvim_create_augroup("UserLspConfig", {}),
|
||||
callback = function(ev)
|
||||
@@ -96,7 +106,7 @@ return {
|
||||
["[d"] = { vim.diagnostic.goto_prev, "Go to previous diagnostic" },
|
||||
["]d"] = { vim.diagnostic.goto_next, "Go to next diagnostic" },
|
||||
["K"] = { vim.lsp.buf.hover, "Show documentation for cursor" },
|
||||
["<leader>rs"] = { ":LspRestart<CR>", "Restart LSP" }
|
||||
["<leader>rs"] = { ":LspRestart<CR>", "Restart LSP" },
|
||||
}
|
||||
|
||||
for key, map in pairs(mappings) do
|
||||
@@ -107,11 +117,11 @@ return {
|
||||
buffer = ev.buf,
|
||||
callback = function()
|
||||
vim.diagnostic.open_float(nil, { focusable = false })
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
vim.o.updatetime = 250
|
||||
end
|
||||
end,
|
||||
})
|
||||
end
|
||||
end,
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ return {
|
||||
mason_lspconfig.setup({
|
||||
-- list of servers for mason to install
|
||||
ensure_installed = {
|
||||
"tsserver",
|
||||
"ts_ls",
|
||||
"html",
|
||||
"cssls",
|
||||
"tailwindcss",
|
||||
|
||||
Reference in New Issue
Block a user