adding notes
This commit is contained in:
5
.nvim/project.lua
Normal file
5
.nvim/project.lua
Normal file
@@ -0,0 +1,5 @@
|
||||
return {
|
||||
type = 'custom',
|
||||
run = [[yarn start]],
|
||||
debug = [[yarn start]],
|
||||
}
|
||||
27
lua/cargdev/core/function/project_commands.lua
Normal file
27
lua/cargdev/core/function/project_commands.lua
Normal file
@@ -0,0 +1,27 @@
|
||||
vim.api.nvim_create_user_command("RunProject", function()
|
||||
local config_path = ".nvim/project.lua"
|
||||
if vim.fn.filereadable(config_path) == 0 then
|
||||
vim.notify("No project config found. Run `:e` on any file to generate it.", vim.log.levels.WARN)
|
||||
return
|
||||
end
|
||||
local config = loadfile(config_path)()
|
||||
if config and config.run then
|
||||
vim.cmd("vsplit | terminal " .. config.run)
|
||||
else
|
||||
vim.notify("Run command not found in project config.", vim.log.levels.ERROR)
|
||||
end
|
||||
end, {})
|
||||
|
||||
vim.api.nvim_create_user_command("DebugProject", function()
|
||||
local config_path = ".nvim/project.lua"
|
||||
if vim.fn.filereadable(config_path) == 0 then
|
||||
vim.notify("No project config found. Run `:e` on any file to generate it.", vim.log.levels.WARN)
|
||||
return
|
||||
end
|
||||
local config = loadfile(config_path)()
|
||||
if config and config.debug then
|
||||
vim.cmd("vsplit | terminal " .. config.debug)
|
||||
else
|
||||
vim.notify("Debug command not found in project config.", vim.log.levels.ERROR)
|
||||
end
|
||||
end, {})
|
||||
@@ -16,4 +16,12 @@ local function load_functions()
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
--[[ vim.api.nvim_create_autocmd("BufReadPost", {
|
||||
once = true,
|
||||
callback = function()
|
||||
require("cargdev.core.project_config").bootstrap_config()
|
||||
end
|
||||
})
|
||||
]]
|
||||
load_functions()
|
||||
|
||||
@@ -65,3 +65,7 @@ keymap.set("n", "<C-l>", ":vertical resize -5<CR>", { noremap = true, silent = t
|
||||
keymap.set("n", "<C-h>", ":vertical resize +5<CR>", { noremap = true, silent = true })
|
||||
keymap.set("n", "<C-k>", ":resize +5<CR>", { noremap = true, silent = true })
|
||||
keymap.set("n", "<C-j>", ":resize -5<CR>", { noremap = true, silent = true })
|
||||
|
||||
-- Run and Debug Project
|
||||
keymap.set("n", "<leader>pr", ":RunProject<CR>", { desc = "Run Project" })
|
||||
keymap.set("n", "<leader>pd", ":DebugProject<CR>", { desc = "Debug Project" })
|
||||
|
||||
57
lua/cargdev/core/project_config.lua
Normal file
57
lua/cargdev/core/project_config.lua
Normal file
@@ -0,0 +1,57 @@
|
||||
local M = {}
|
||||
|
||||
local function ask_input(prompt, default)
|
||||
vim.fn.inputsave()
|
||||
local result = vim.fn.input(prompt .. " [" .. default .. "]: ")
|
||||
vim.fn.inputrestore()
|
||||
return result ~= "" and result or default
|
||||
end
|
||||
|
||||
local function detect_project_type()
|
||||
if vim.fn.filereadable("pom.xml") == 1 then
|
||||
return "java"
|
||||
elseif vim.fn.filereadable("angular.json") == 1 then
|
||||
return "angular"
|
||||
elseif vim.fn.filereadable("package.json") == 1 then
|
||||
local pkg = vim.fn.readfile("package.json")
|
||||
for _, line in ipairs(pkg) do
|
||||
if line:match("nestjs") then return "node" end
|
||||
if line:match("react") then return "react" end
|
||||
end
|
||||
return "node"
|
||||
end
|
||||
return "custom"
|
||||
end
|
||||
|
||||
M.bootstrap_config = function()
|
||||
local config_file = ".nvim/project.lua"
|
||||
if vim.fn.filereadable(config_file) == 1 then return end
|
||||
|
||||
vim.fn.mkdir(".nvim", "p")
|
||||
|
||||
local type = detect_project_type()
|
||||
vim.notify("Detected project type: " .. type, vim.log.levels.INFO)
|
||||
|
||||
-- Ask user for run/debug commands
|
||||
local run = ask_input("Enter run command", type == "java" and "./mvnw spring-boot:run" or "yarn start")
|
||||
local debug = ask_input("Enter debug command", type == "java"
|
||||
and "./mvnw spring-boot:run -Dspring-boot.run.jvmArguments='-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005'"
|
||||
or "node --inspect-brk dist/main.js")
|
||||
|
||||
-- Write to file
|
||||
local f = io.open(config_file, "w")
|
||||
if f then
|
||||
f:write("return {\n")
|
||||
f:write(" type = '" .. type .. "',\n")
|
||||
f:write(" run = [[" .. run .. "]],\n")
|
||||
f:write(" debug = [[" .. debug .. "]],\n")
|
||||
f:write("}\n")
|
||||
f:close()
|
||||
vim.notify("Project configuration written to " .. config_file, vim.log.levels.INFO)
|
||||
else
|
||||
vim.notify("Failed to write config file", vim.log.levels.ERROR)
|
||||
end
|
||||
end
|
||||
|
||||
return M
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
return {
|
||||
{
|
||||
"CarGDev/avante.nvim",
|
||||
"yetone/avante.nvim",
|
||||
event = "VeryLazy",
|
||||
lazy = false,
|
||||
version = false, -- Always pull the latest change
|
||||
@@ -11,7 +11,7 @@ return {
|
||||
name = "cargdev", -- Optional
|
||||
endpoint = "https://api-ai.cargdev.io/api/generate",
|
||||
api_key_name = "CARGDEV_API_KEY", -- reference the ENV VAR below
|
||||
model = "qwen2.5-coder:7b",
|
||||
model = "codellama:7b",
|
||||
__inherited_from = "ollama", -- ensures compatibility
|
||||
max_tokens = 8192,
|
||||
},
|
||||
@@ -43,13 +43,14 @@ return {
|
||||
},
|
||||
},
|
||||
{
|
||||
"MeanderingProgrammer/render-markdown.nvim", -- Render markdown support
|
||||
opts = {
|
||||
file_types = { "markdown", "Avante" },
|
||||
},
|
||||
"MeanderingProgrammer/render-markdown.nvim",
|
||||
ft = { "markdown", "Avante" },
|
||||
config = function()
|
||||
require("render-markdown").setup({
|
||||
file_types = { "markdown", "Avante" },
|
||||
})
|
||||
end,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
32
lua/cargdev/plugins/companion.lua.bak
Normal file
32
lua/cargdev/plugins/companion.lua.bak
Normal file
@@ -0,0 +1,32 @@
|
||||
-- return {
|
||||
-- {
|
||||
-- "olimorris/codecompanion.nvim",
|
||||
-- event = "VeryLazy",
|
||||
-- lazy = false,
|
||||
-- version = false,
|
||||
-- opts = {
|
||||
-- adapters = {
|
||||
-- openai = function()
|
||||
-- return require("codecompanion.adapters").extend("openai", {
|
||||
-- name = "openai",
|
||||
-- model = "codellama:7b",
|
||||
-- endpoint = "https://api-ai.cargdev.io/v1",
|
||||
-- api_key = os.getenv("CARGDEV_API_KEY"),
|
||||
-- max_tokens = 2048,
|
||||
-- })
|
||||
-- end,
|
||||
-- },
|
||||
-- strategies = {
|
||||
-- chat = { adapter = "openai" },
|
||||
-- inline = { adapter = "openai" },
|
||||
-- agent = { adapter = "openai" },
|
||||
-- },
|
||||
-- },
|
||||
-- dependencies = {
|
||||
-- "nvim-lua/plenary.nvim",
|
||||
-- "nvim-treesitter/nvim-treesitter",
|
||||
-- "nvim-telescope/telescope.nvim",
|
||||
-- },
|
||||
-- }
|
||||
-- }
|
||||
--
|
||||
@@ -1,27 +1,108 @@
|
||||
return {
|
||||
"mfussenegger/nvim-dap",
|
||||
dependencies = {
|
||||
{ "nvim-neotest/nvim-nio", lazy = false }, -- Ensure `nvim-nio` loads first
|
||||
{ "nvim-neotest/nvim-nio", lazy = false },
|
||||
"rcarriga/nvim-dap-ui",
|
||||
"jay-babu/mason-nvim-dap.nvim",
|
||||
"mfussenegger/nvim-dap-python",
|
||||
"theHamsta/nvim-dap-virtual-text",
|
||||
"nvim-telescope/telescope-dap.nvim",
|
||||
"Weissle/persistent-breakpoints.nvim",
|
||||
{
|
||||
"nvim-neotest/neotest",
|
||||
dependencies = {
|
||||
"nvim-neotest/neotest-jest",
|
||||
"nvim-neotest/neotest-python",
|
||||
"nvim-lua/plenary.nvim",
|
||||
"antoinemadec/FixCursorHold.nvim",
|
||||
},
|
||||
config = function()
|
||||
require("neotest").setup({
|
||||
adapters = {
|
||||
require("neotest-jest")({}),
|
||||
require("neotest-python")({}),
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
},
|
||||
config = function()
|
||||
local dap = require("dap")
|
||||
local dapui = require("dapui")
|
||||
local widgets = require("dap.ui.widgets")
|
||||
local api, fn = vim.api, vim.fn
|
||||
local keymap = vim.keymap.set
|
||||
|
||||
-- UI Setup
|
||||
dapui.setup()
|
||||
-- 🎯 Fixed Layout UI (no floating)
|
||||
dapui.setup({
|
||||
layouts = {
|
||||
{
|
||||
elements = {
|
||||
{ id = "scopes", size = 0.25 },
|
||||
{ id = "breakpoints", size = 0.25 },
|
||||
{ id = "stacks", size = 0.25 },
|
||||
{ id = "watches", size = 0.25 },
|
||||
},
|
||||
size = 40, -- width (left)
|
||||
position = "left",
|
||||
},
|
||||
{
|
||||
elements = {
|
||||
{ id = "repl", size = 0.5 },
|
||||
{ id = "console", size = 0.5 },
|
||||
},
|
||||
size = 10, -- height (bottom)
|
||||
position = "bottom",
|
||||
},
|
||||
},
|
||||
controls = {
|
||||
enabled = true,
|
||||
element = "repl",
|
||||
icons = {
|
||||
pause = "⏸",
|
||||
play = "▶",
|
||||
step_into = "⤵",
|
||||
step_over = "⏭",
|
||||
step_out = "⤴",
|
||||
step_back = "⏮",
|
||||
run_last = "🔁",
|
||||
terminate = "⏹",
|
||||
},
|
||||
},
|
||||
floating = { border = "rounded", mappings = { close = { "q", "<Esc>" } } },
|
||||
windows = { indent = 1 },
|
||||
})
|
||||
|
||||
-- Mason Debugger Installer
|
||||
-- 🧠 Mason DAP
|
||||
require("mason-nvim-dap").setup({
|
||||
ensure_installed = { "node2", "chrome", "firefox" },
|
||||
automatic_setup = true,
|
||||
})
|
||||
|
||||
-- Automatically open DAP UI when debugging starts
|
||||
-- 🔍 Virtual Text
|
||||
require("nvim-dap-virtual-text").setup({
|
||||
commented = true,
|
||||
highlight_changed_variables = true,
|
||||
highlight_new_as_changed = true,
|
||||
virt_text_pos = "eol",
|
||||
all_frames = true,
|
||||
})
|
||||
|
||||
-- 💾 Persistent Breakpoints
|
||||
require("persistent-breakpoints").setup({
|
||||
load_breakpoints_event = { "BufReadPost" },
|
||||
})
|
||||
|
||||
api.nvim_create_autocmd("VimLeavePre", {
|
||||
callback = function()
|
||||
local ok, pb = pcall(require, "persistent-breakpoints.api")
|
||||
if ok and type(pb.save_breakpoints) == "function" then
|
||||
pb.save_breakpoints()
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
-- 🔁 Auto-open/close UI on debug events
|
||||
dap.listeners.after.event_initialized["dapui_config"] = function()
|
||||
dapui.open()
|
||||
end
|
||||
@@ -32,56 +113,63 @@ return {
|
||||
dapui.close()
|
||||
end
|
||||
|
||||
-- Enable virtual text for debugging
|
||||
require("nvim-dap-virtual-text").setup({})
|
||||
|
||||
-- Keymaps for debugging
|
||||
local keymap = vim.keymap.set
|
||||
keymap("n", "<leader>dc", "<Cmd>lua require'dap'.continue()<CR>", { desc = "Start Debugging" })
|
||||
|
||||
keymap("n", "<leader>do", function()
|
||||
dap.step_over()
|
||||
end, { desc = "Step Over" })
|
||||
|
||||
keymap("n", "<leader>di", function()
|
||||
dap.step_into()
|
||||
end, { desc = "Step Into" })
|
||||
|
||||
keymap("n", "<leader>dot", function()
|
||||
dap.step_out()
|
||||
end, { desc = "Step Out" })
|
||||
|
||||
keymap("n", "<leader>db", function()
|
||||
dap.toggle_breakpoint()
|
||||
end, { desc = "Toggle Breakpoint" })
|
||||
|
||||
-- 🎮 Keymaps
|
||||
keymap("n", "<leader>dc", dap.continue, { desc = "▶ Start Debugging" })
|
||||
keymap("n", "<leader>do", dap.step_over, { desc = "⏭ Step Over" })
|
||||
keymap("n", "<leader>di", dap.step_into, { desc = "⤵ Step Into" })
|
||||
keymap("n", "<leader>dot", dap.step_out, { desc = "⤴ Step Out" })
|
||||
keymap("n", "<leader>db", dap.toggle_breakpoint, { desc = "🔴 Toggle Breakpoint" })
|
||||
keymap("n", "<leader>dB", function()
|
||||
dap.set_breakpoint(vim.fn.input("Breakpoint condition: "))
|
||||
end, { desc = "Conditional Breakpoint" })
|
||||
dap.set_breakpoint(fn.input("Breakpoint condition: "))
|
||||
end, { desc = "⚠ Conditional Breakpoint" })
|
||||
keymap("n", "<leader>dr", dap.repl.open, { desc = "💬 Open REPL" })
|
||||
keymap("n", "<leader>dl", dap.run_last, { desc = "🔁 Run Last Debug" })
|
||||
keymap("n", "<leader>du", dapui.toggle, { desc = "🧩 Toggle DAP UI" })
|
||||
keymap("n", "<leader>dq", dap.terminate, { desc = "⛔ Stop Debugging" })
|
||||
|
||||
keymap("n", "<leader>dr", function()
|
||||
dap.repl.open()
|
||||
end, { desc = "Open REPL" })
|
||||
-- 🧼 Reset UI
|
||||
keymap("n", "<leader>drt", function()
|
||||
dap.terminate()
|
||||
dapui.close()
|
||||
vim.defer_fn(function()
|
||||
dapui.open()
|
||||
end, 200)
|
||||
end, { desc = "🧼 Reset DAP UI Layout" })
|
||||
|
||||
keymap("n", "<leader>dl", function()
|
||||
dap.run_last()
|
||||
end, { desc = "Run Last Debug Session" })
|
||||
-- 🔭 Telescope Integration
|
||||
require("telescope").load_extension("dap")
|
||||
keymap("n", "<leader>dcf", "<cmd>Telescope dap configurations<cr>", { desc = "🔭 DAP Configs" })
|
||||
keymap("n", "<leader>dcb", "<cmd>Telescope dap list_breakpoints<cr>", { desc = "🧷 List Breakpoints" })
|
||||
keymap("n", "<leader>dco", "<cmd>Telescope dap commands<cr>", { desc = "⚙️ DAP Commands" })
|
||||
|
||||
keymap("n", "<leader>du", function()
|
||||
dapui.toggle()
|
||||
end, { desc = "Toggle DAP UI" })
|
||||
|
||||
keymap("n", "<leader>dq", "<Cmd>lua require'dap'.terminate()<CR>", { desc = "Stop Debugging" })
|
||||
|
||||
-- Java DAP Configuration
|
||||
dap.adapters.java = function(callback)
|
||||
callback({
|
||||
type = "server",
|
||||
host = "127.0.0.1",
|
||||
port = { port }, -- Port JDTLS uses for debugging
|
||||
})
|
||||
-- 🧿 Sign Icons
|
||||
for name, icon in pairs({
|
||||
DapBreakpoint = "🔴",
|
||||
DapBreakpointCondition = "⚠️",
|
||||
DapBreakpointRejected = "🚫",
|
||||
DapLogPoint = "💬",
|
||||
DapStopped = "▶",
|
||||
}) do
|
||||
fn.sign_define(name, { text = icon, texthl = "DiagnosticSignInfo", linehl = "", numhl = "" })
|
||||
end
|
||||
|
||||
-- 🔁 NestJS Smart Watcher (optional)
|
||||
api.nvim_create_autocmd("BufWritePost", {
|
||||
pattern = "*.ts",
|
||||
callback = function()
|
||||
if fn.filereadable(".nvim/project.lua") == 1 then
|
||||
local config = loadfile(".nvim/project.lua")()
|
||||
if config and config.run and config.run:match("nest") then
|
||||
-- Your custom logic here
|
||||
end
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
-- ☕ Java Debug Adapter
|
||||
dap.adapters.java = function(callback)
|
||||
callback({ type = "server", host = "127.0.0.1", port = { port } })
|
||||
end
|
||||
dap.configurations.java = {
|
||||
{
|
||||
name = "Attach to running Java process",
|
||||
@@ -92,11 +180,13 @@ return {
|
||||
},
|
||||
}
|
||||
|
||||
-- Node.js Adapter Configuration for NestJS
|
||||
-- 🧠 Node.js (NestJS / TypeScript)
|
||||
dap.adapters.node2 = {
|
||||
type = "executable",
|
||||
command = "node",
|
||||
args = { os.getenv("HOME") .. "/.local/share/nvim/mason/packages/node-debug2-adapter/out/src/nodedebug.js" },
|
||||
args = {
|
||||
os.getenv("HOME") .. "/.local/share/nvim/mason/packages/node-debug2-adapter/out/src/nodedebug.js",
|
||||
},
|
||||
}
|
||||
|
||||
dap.configurations.typescript = {
|
||||
@@ -110,82 +200,21 @@ return {
|
||||
outFiles = { "${workspaceFolder}/dist/**/*.js" },
|
||||
sourceMaps = true,
|
||||
protocol = "inspector",
|
||||
cwd = vim.fn.getcwd(),
|
||||
runtimeArgs = { "--inspect-brk" }, -- 🚀 Ensures debugging starts properly
|
||||
cwd = fn.getcwd(),
|
||||
runtimeArgs = { "--inspect-brk" },
|
||||
restart = true,
|
||||
},
|
||||
{
|
||||
name = "Attach to Process",
|
||||
name = "Attach to NestJS (start:debug)",
|
||||
type = "node2",
|
||||
request = "attach",
|
||||
processId = require("dap.utils").pick_process,
|
||||
port = 9229,
|
||||
protocol = "inspector",
|
||||
cwd = fn.getcwd(),
|
||||
sourceMaps = true,
|
||||
outFiles = { "${workspaceFolder}/dist/**/*.js" },
|
||||
skipFiles = { "<node_internals>/**" },
|
||||
},
|
||||
}
|
||||
|
||||
-- dap.configurations.typescript = {
|
||||
-- {
|
||||
-- name = "Launch NestJS",
|
||||
-- type = "node2",
|
||||
-- request = "launch",
|
||||
-- program = "${workspaceFolder}/dist/main.js", -- ⚠️ Ensure this is correct!
|
||||
-- args = {},
|
||||
-- console = "integratedTerminal",
|
||||
-- outFiles = { "${workspaceFolder}/dist/**/*.js" },
|
||||
-- sourceMaps = true,
|
||||
-- protocol = "inspector",
|
||||
-- cwd = vim.fn.getcwd(),
|
||||
-- runtimeArgs = { "--nolazy" },
|
||||
-- },
|
||||
-- {
|
||||
-- name = "Attach to Process",
|
||||
-- type = "node2",
|
||||
-- request = "attach",
|
||||
-- processId = require("dap.utils").pick_process,
|
||||
-- },
|
||||
-- }
|
||||
|
||||
-- dap.adapters.chrome = {
|
||||
-- type = "executable",
|
||||
-- command = "node",
|
||||
-- args = { os.getenv("HOME") .. "/.local/share/nvim/mason/packages/chrome-debug-adapter/out/src/chromeDebug.js" },
|
||||
-- }
|
||||
--
|
||||
-- dap.configurations.typescript = {
|
||||
-- {
|
||||
-- name = "Attach to Chrome",
|
||||
-- type = "chrome",
|
||||
-- request = "attach",
|
||||
-- program = "${file}",
|
||||
-- cwd = vim.fn.getcwd(),
|
||||
-- port = 9222, -- 🚀 Chrome debugging port
|
||||
-- webRoot = "${workspaceFolder}",
|
||||
-- sourceMaps = true,
|
||||
-- skipFiles = { "<node_internals>/**", "webpack://_N_E/./node_modules/**" },
|
||||
-- },
|
||||
-- {
|
||||
-- name = "Launch Chrome with DevTools",
|
||||
-- type = "chrome",
|
||||
-- request = "launch",
|
||||
-- url = "http://localhost:4000", -- Your React app runs on this port
|
||||
-- webRoot = "${workspaceFolder}",
|
||||
-- runtimeArgs = { "--remote-debugging-port=9222" },
|
||||
-- sourceMaps = true,
|
||||
-- skipFiles = { "<node_internals>/**", "webpack://_N_E/./node_modules/**" },
|
||||
-- },
|
||||
-- }
|
||||
--
|
||||
-- dap.configurations.javascript = {
|
||||
-- {
|
||||
-- name = "Attach to Chrome",
|
||||
-- type = "chrome",
|
||||
-- request = "attach",
|
||||
-- program = "${file}",
|
||||
-- cwd = vim.fn.getcwd(),
|
||||
-- port = 9222, -- 🚀 Default Chrome Debug Port
|
||||
-- webRoot = "${workspaceFolder}",
|
||||
-- sourceMaps = true,
|
||||
-- skipFiles = { "<node_internals>/**", "webpack://_N_E/./node_modules/**" },
|
||||
-- },
|
||||
-- }
|
||||
end,
|
||||
}
|
||||
|
||||
11
lua/cargdev/plugins/fileOperations.lua
Normal file
11
lua/cargdev/plugins/fileOperations.lua
Normal file
@@ -0,0 +1,11 @@
|
||||
return {
|
||||
"antosha417/nvim-lsp-file-operations",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
"nvim-tree/nvim-tree.lua", -- or "nvim-neo-tree/neo-tree.nvim"
|
||||
},
|
||||
config = function()
|
||||
require("lsp-file-operations").setup()
|
||||
end
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ 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" } }, -- <- CORRECT HERE
|
||||
},
|
||||
config = function()
|
||||
-- import lspconfig plugin
|
||||
@@ -64,6 +65,27 @@ return {
|
||||
|
||||
opts.desc = "Restart LSP"
|
||||
keymap.set("n", "<leader>rs", ":LspRestart<CR>", opts) -- mapping to restart lsp if necessary
|
||||
vim.api.nvim_create_autocmd("CursorHold", {
|
||||
buffer = ev.buf,
|
||||
callback = function()
|
||||
vim.diagnostic.open_float(nil, { focusable = false })
|
||||
end,
|
||||
})
|
||||
vim.o.updatetime = 250
|
||||
vim.diagnostic.config({
|
||||
float = {
|
||||
border = "rounded",
|
||||
source = "always", -- Or "if_many"
|
||||
header = "",
|
||||
prefix = "",
|
||||
},
|
||||
virtual_text = {
|
||||
spacing = 4,
|
||||
prefix = "●", -- Could be '●', '■', '▎', or empty ""
|
||||
severity = { min = vim.diagnostic.severity.WARN }, -- only show Warn or higher
|
||||
},
|
||||
severity_sort = true,
|
||||
})
|
||||
end,
|
||||
})
|
||||
|
||||
@@ -81,6 +103,7 @@ return {
|
||||
mason_lspconfig.setup_handlers({
|
||||
["tsserver"] = function()
|
||||
lspconfig["tsserver"].setup({
|
||||
cmd = { "typescript-language-server", "--stdio" },
|
||||
capabilities = capabilities,
|
||||
root_dir = lspconfig.util.root_pattern("package.json"),
|
||||
settings = {
|
||||
@@ -165,5 +188,17 @@ return {
|
||||
})
|
||||
end,
|
||||
})
|
||||
require("typescript-tools").setup({
|
||||
settings = {
|
||||
expose_as_code_action = "all",
|
||||
tsserver_file_preferences = {
|
||||
importModuleSpecifierPreference = "relative",
|
||||
quotePreference = "single",
|
||||
},
|
||||
tsserver_format_options = {
|
||||
allowIncompleteCompletions = true,
|
||||
},
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
||||
|
||||
@@ -8,6 +8,14 @@ return {
|
||||
vim.g.loaded_netrw = 1
|
||||
vim.g.loaded_netrwPlugin = 1
|
||||
|
||||
-- 🧼 Remove invalid autocommand (FileExplorer) if it exists
|
||||
vim.api.nvim_create_autocmd("VimEnter", {
|
||||
once = true,
|
||||
callback = function()
|
||||
pcall(vim.cmd, "autocmd! FileExplorer *")
|
||||
end,
|
||||
})
|
||||
|
||||
nvimtree.setup({
|
||||
view = {
|
||||
width = 35,
|
||||
|
||||
93
tree.log
93
tree.log
@@ -1,5 +1,4 @@
|
||||
.
|
||||
├── README.md
|
||||
├── ftplugin
|
||||
│ └── java.lua
|
||||
├── init.lua
|
||||
@@ -8,52 +7,52 @@
|
||||
├── lazigitconfig.log
|
||||
├── lazy-lock.json
|
||||
├── lua
|
||||
│ ├── cargdev
|
||||
│ │ ├── core
|
||||
│ │ │ ├── function
|
||||
│ │ │ │ └── openTerminal.lua
|
||||
│ │ │ ├── init.lua
|
||||
│ │ │ ├── keymaps.lua
|
||||
│ │ │ └── options.lua
|
||||
│ │ ├── lazy.lua
|
||||
│ │ └── plugins
|
||||
│ │ ├── alpha.lua
|
||||
│ │ ├── auto-session.lua
|
||||
│ │ ├── autopairs.lua
|
||||
│ │ ├── bufferline.lua
|
||||
│ │ ├── buffertabs.lua
|
||||
│ │ ├── colorscheme.lua
|
||||
│ │ ├── comments.lua
|
||||
│ │ ├── copilot.lua
|
||||
│ │ ├── dap.lua
|
||||
│ │ ├── dressing.lua
|
||||
│ │ ├── formatting.lua
|
||||
│ │ ├── gitsigns.lua
|
||||
│ │ ├── indent-blankline.lua
|
||||
│ └── cargdev
|
||||
│ ├── core
|
||||
│ │ ├── function
|
||||
│ │ │ └── openTerminal.lua
|
||||
│ │ ├── init.lua
|
||||
│ │ ├── lazygit.lua
|
||||
│ │ ├── linting.lua
|
||||
│ │ ├── lsp
|
||||
│ │ │ ├── jdtls.lua
|
||||
│ │ │ ├── lspconfig.lua
|
||||
│ │ │ └── mason.lua
|
||||
│ │ ├── lualine.lua
|
||||
│ │ ├── noice.lua
|
||||
│ │ ├── nvim-cmp.lua
|
||||
│ │ ├── nvim-jdtls.lua
|
||||
│ │ ├── nvim-tree.lua
|
||||
│ │ ├── nvim-treesitter-text-objects.lua
|
||||
│ │ ├── substitute.lua
|
||||
│ │ ├── surround.lua
|
||||
│ │ ├── telescope.lua
|
||||
│ │ ├── tmux.lua
|
||||
│ │ ├── todo-comments.lua
|
||||
│ │ ├── treesitter.lua
|
||||
│ │ ├── trouble.lua
|
||||
│ │ ├── vim-maximizer.lua
|
||||
│ │ ├── wakatime.lua
|
||||
│ │ └── which-key.lua
|
||||
│ └── myconfig
|
||||
│ │ ├── keymaps.lua
|
||||
│ │ └── options.lua
|
||||
│ ├── lazy.lua
|
||||
│ └── plugins
|
||||
│ ├── aicargdev.lua
|
||||
│ ├── alpha.lua
|
||||
│ ├── auto-session.lua
|
||||
│ ├── autopairs.lua
|
||||
│ ├── bufferline.lua
|
||||
│ ├── buffertabs.lua
|
||||
│ ├── colorscheme.lua
|
||||
│ ├── comments.lua
|
||||
│ ├── copilot.lua
|
||||
│ ├── dap.lua
|
||||
│ ├── dressing.lua
|
||||
│ ├── formatting.lua
|
||||
│ ├── gitsigns.lua
|
||||
│ ├── indent-blankline.lua
|
||||
│ ├── init.lua
|
||||
│ ├── lazygit.lua
|
||||
│ ├── linting.lua
|
||||
│ ├── lsp
|
||||
│ │ ├── lspconfig.lua
|
||||
│ │ └── mason.lua
|
||||
│ ├── lualine.lua
|
||||
│ ├── noice.lua
|
||||
│ ├── nvim-cmp.lua
|
||||
│ ├── nvim-jdtls.lua
|
||||
│ ├── nvim-tree.lua
|
||||
│ ├── nvim-treesitter-text-objects.lua
|
||||
│ ├── substitute.lua
|
||||
│ ├── surround.lua
|
||||
│ ├── telescope.lua
|
||||
│ ├── tmux.lua
|
||||
│ ├── todo-comments.lua
|
||||
│ ├── treesitter.lua
|
||||
│ ├── trouble.lua
|
||||
│ ├── vim-maximizer.lua
|
||||
│ ├── wakatime.lua
|
||||
│ └── which-key.lua
|
||||
├── README.md
|
||||
└── tree.log
|
||||
|
||||
9 directories, 48 files
|
||||
8 directories, 48 files
|
||||
|
||||
Reference in New Issue
Block a user