chore: adding more configurations

This commit is contained in:
Carlos
2025-07-06 14:37:08 -04:00
parent 3f9a502503
commit 87aa445764
7 changed files with 110 additions and 48 deletions

View File

@@ -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>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>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>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 -- Copilot
-- Add key map on normal mode to open copilot panel on c + tab -- Add key map on normal mode to open copilot panel on c + tab

View 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,
-- },
-- },
-- },
-- }

View File

@@ -5,28 +5,32 @@ return {
lazy = false, lazy = false,
version = false, -- Always pull the latest change version = false, -- Always pull the latest change
opts = { opts = {
provider = "cargdev", -- API provider configuration provider = "claude", -- API provider configuration
providers = { providers = {
cargdev = { claude = {
name = "cargdev", -- Optional endpoint = "https://api.anthropic.com",
endpoint = "https://api-ai.cargdev.io", -- API endpoint model = "claude-3-haiku-20240307",
api_key_name = "CARGDEV_API_KEY", -- reference the ENV VAR below timeout = 30000, -- Timeout in milliseconds
model = "deepseek-r1:latest", extra_request_body = {
__inherited_from = "ollama", -- ensures compatibility temperature = 0.75,
max_tokens = 8192, max_tokens = 4096,
},
}, },
}, },
}, },
-- Optional: Build from source if required -- Optional: Build from source if required
build = "make", build = "make",
dependencies = { dependencies = {
"nvim-treesitter/nvim-treesitter", -- Syntax highlighting support "nvim-treesitter/nvim-treesitter",
"stevearc/dressing.nvim", -- UI elements "nvim-lua/plenary.nvim",
"nvim-lua/plenary.nvim", -- Utility library "MunifTanjim/nui.nvim",
"MunifTanjim/nui.nvim", -- UI library for modal components "echasnovski/mini.pick", -- for file_selector provider mini.pick
-- Optional dependencies: "nvim-telescope/telescope.nvim", -- for file_selector provider telescope
"nvim-tree/nvim-web-devicons", -- Icons support "hrsh7th/nvim-cmp", -- autocompletion for avante commands and mentions
"zbirenbaum/copilot.lua", -- Copilot integration "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 "HakonHarnes/img-clip.nvim", -- Image pasting support
event = "VeryLazy", event = "VeryLazy",

View File

@@ -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,
-- }

View File

@@ -23,7 +23,7 @@ return {
}, },
suggestion = { suggestion = {
enabled = true, enabled = true,
auto_trigger = false, auto_trigger = true,
debounce = 75, debounce = 75,
trigger_on_accept = false, trigger_on_accept = false,
keymap = { keymap = {
@@ -54,6 +54,9 @@ return {
position = "right", -- Position of the chat window position = "right", -- Position of the chat window
ratio = 0.5, ratio = 0.5,
}, },
tiktoken = {
enabled = false, -- Enable token counting
},
floating = { floating = {
enabled = true, enabled = true,
border = "rounded", border = "rounded",

View File

@@ -5,7 +5,10 @@ return {
"hrsh7th/cmp-nvim-lsp", "hrsh7th/cmp-nvim-lsp",
{ "antosha417/nvim-lsp-file-operations", config = true }, { "antosha417/nvim-lsp-file-operations", config = true },
{ "folke/neodev.nvim", opts = {} }, { "folke/neodev.nvim", opts = {} },
{ "pmizio/typescript-tools.nvim", dependencies = { "nvim-lua/plenary.nvim" } } {
"pmizio/typescript-tools.nvim",
dependencies = { "nvim-lua/plenary.nvim" },
},
}, },
config = function() config = function()
local lspconfig = require("lspconfig") local lspconfig = require("lspconfig")
@@ -21,31 +24,29 @@ return {
"gopls", "gopls",
"graphql", "graphql",
"html", "html",
"jdtls", -- "jdtls", -- uncomment if youre actively doing Java
"lua_ls", "lua_ls",
"prismals", "prismals",
"pyright", "pyright",
"svelte", "svelte",
"tailwindcss", "tailwindcss",
"ts_ls" },
}
}) })
local capabilities = cmp_nvim_lsp.default_capabilities() local capabilities = cmp_nvim_lsp.default_capabilities()
-- Define signs for diagnostics
vim.diagnostic.config({ vim.diagnostic.config({
signs = { signs = {
severity = { severity = {
min = vim.diagnostic.severity.WARN min = vim.diagnostic.severity.WARN,
}, },
icons = { icons = {
Error = "", Error = "",
Warn = "", Warn = "",
Hint = "󰠠 ", Hint = "󰠠 ",
Info = "" Info = "",
} },
} },
}) })
local servers = { local servers = {
@@ -55,23 +56,22 @@ return {
gopls = {}, gopls = {},
graphql = {}, graphql = {},
html = {}, html = {},
jdtls = {}, -- jdtls = {}, -- same here
lua_ls = { lua_ls = {
settings = { settings = {
Lua = { Lua = {
diagnostics = { globals = { "vim" } }, diagnostics = { globals = { "vim" } },
workspace = { workspace = {
library = vim.api.nvim_get_runtime_file("", true), library = vim.api.nvim_get_runtime_file("", true),
checkThirdParty = false checkThirdParty = false,
} },
} },
} },
}, },
prismals = {}, prismals = {},
pyright = {}, pyright = {},
svelte = {}, svelte = {},
tailwindcss = {}, tailwindcss = {},
ts_ls = {}
} }
for server, config in pairs(servers) do for server, config in pairs(servers) do
@@ -79,6 +79,16 @@ return {
lspconfig[server].setup(config) lspconfig[server].setup(config)
end 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", { vim.api.nvim_create_autocmd("LspAttach", {
group = vim.api.nvim_create_augroup("UserLspConfig", {}), group = vim.api.nvim_create_augroup("UserLspConfig", {}),
callback = function(ev) callback = function(ev)
@@ -96,7 +106,7 @@ return {
["[d"] = { vim.diagnostic.goto_prev, "Go to previous diagnostic" }, ["[d"] = { vim.diagnostic.goto_prev, "Go to previous diagnostic" },
["]d"] = { vim.diagnostic.goto_next, "Go to next diagnostic" }, ["]d"] = { vim.diagnostic.goto_next, "Go to next diagnostic" },
["K"] = { vim.lsp.buf.hover, "Show documentation for cursor" }, ["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 for key, map in pairs(mappings) do
@@ -107,11 +117,11 @@ return {
buffer = ev.buf, buffer = ev.buf,
callback = function() callback = function()
vim.diagnostic.open_float(nil, { focusable = false }) vim.diagnostic.open_float(nil, { focusable = false })
end end,
}) })
vim.o.updatetime = 250 vim.o.updatetime = 250
end end,
}) })
end end,
} }

View File

@@ -27,7 +27,7 @@ return {
mason_lspconfig.setup({ mason_lspconfig.setup({
-- list of servers for mason to install -- list of servers for mason to install
ensure_installed = { ensure_installed = {
"tsserver", "ts_ls",
"html", "html",
"cssls", "cssls",
"tailwindcss", "tailwindcss",