1 parent
b1a92f479d
commit
b5f1714ee7
35 files changed
+1811
-2063
No files matched your search
@@ -3,25 +3,24 @@
|
|||||||
Description: Entry point file for neovim
|
Description: Entry point file for neovim
|
||||||
]]
|
]]
|
||||||
|
|
||||||
vim.g.mapleader = ' ' -- Use Space, like key for alternative hotkeys
|
vim.g.mapleader = " " -- Use Space, like key for alternative hotkeys
|
||||||
|
|
||||||
-- Bootsraping plugin manager
|
-- Bootsraping plugin manager
|
||||||
vim.pack.add({ 'https://github.com/zuqini/zpack.nvim' })
|
vim.pack.add({ "https://github.com/zuqini/zpack.nvim" })
|
||||||
|
|
||||||
|
|
||||||
-- Settings
|
-- Settings
|
||||||
require "settings"
|
require("settings")
|
||||||
require('zpack').setup()
|
require("zpack").setup()
|
||||||
|
|
||||||
vim.opt.background = "dark" -- set this to dark or light
|
vim.opt.background = "dark" -- set this to dark or light
|
||||||
vim.cmd("colorscheme teide-darker")
|
-- vim.cmd("colorscheme teide-darker")
|
||||||
require "keyboard"
|
require("keyboard")
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd("BufWritePre", {
|
vim.api.nvim_create_autocmd("BufWritePre", {
|
||||||
pattern = "*",
|
pattern = "*",
|
||||||
callback = function(args)
|
callback = function(args)
|
||||||
require("conform").format({ bufnr = args.buf })
|
require("conform").format({ bufnr = args.buf })
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
vim.o.formatexpr = "v:lua.require'conform'.formatexpr()"
|
vim.o.formatexpr = "v:lua.require'conform'.formatexpr()"
|
||||||
-- vim:tabstop=2 shiftwidth=2 expandtab syntax=lua foldmethod=marker foldlevelstart=0 foldlevel=0
|
-- vim:tabstop=2 shiftwidth=2 expandtab syntax=lua foldmethod=marker foldlevelstart=0 foldlevel=0
|
||||||
+441
-43
@@ -1,63 +1,461 @@
|
|||||||
-- This file is intentionally left empty
|
-- keyboard.lua
|
||||||
-- Put your keybindings with wk package here
|
-- All keymaps centralized. Loaded after plugins so every mapping wins.
|
||||||
|
|
||||||
local wk = require('which-key')
|
local wk = require("which-key")
|
||||||
|
local utils = require("utils")
|
||||||
|
|
||||||
|
-- Helper: merge description into opts
|
||||||
local function mdesc(opt, description)
|
local function mdesc(opt, description)
|
||||||
return vim.tbl_extend("force", opt, { desc = description })
|
return vim.tbl_extend("force", opt, { desc = description })
|
||||||
end
|
end
|
||||||
|
|
||||||
local map = function(mode, lhs, rhs, opts, desc)
|
local map = function(mode, lhs, rhs, opts, desc)
|
||||||
opts = opts and opts or {}
|
opts = opts and opts or {}
|
||||||
opts = mdesc(opts, desc)
|
opts = mdesc(opts, desc)
|
||||||
vim.keymap.set(mode, lhs, rhs, opts)
|
vim.keymap.set(mode, lhs, rhs, opts)
|
||||||
end
|
end
|
||||||
local builtin = require('telescope.builtin')
|
|
||||||
vim.keymap.set('n', '<leader>ff', builtin.find_files, { desc = 'Telescope find files' })
|
-- =============================================================================
|
||||||
vim.keymap.set('n', '<leader>fg', builtin.live_grep, { desc = 'Telescope live grep' })
|
-- Which-key groups
|
||||||
vim.keymap.set('n', '<leader>fb', builtin.buffers, { desc = 'Telescope buffers' })
|
-- =============================================================================
|
||||||
vim.keymap.set('n', '<leader>fh', builtin.help_tags, { desc = 'Telescope help tags' })
|
wk.add({
|
||||||
|
{ "<leader>b", group = "Buffer" },
|
||||||
|
{ "<leader>c", group = "Code" },
|
||||||
|
{ "<leader>d", group = "Debug" },
|
||||||
|
{ "<leader>f", group = "Find" },
|
||||||
|
{ "<leader>g", group = "Git" },
|
||||||
|
{ "<leader>l", group = "LSP" },
|
||||||
|
{ "<leader>s", group = "Search" },
|
||||||
|
{ "<leader>t", group = "Test/Run" },
|
||||||
|
{ "<leader>u", group = "UI Toggle" },
|
||||||
|
{ "<leader>w", group = "Window/Workspace" },
|
||||||
|
})
|
||||||
|
|
||||||
|
-- =============================================================================
|
||||||
|
-- General
|
||||||
|
-- =============================================================================
|
||||||
|
map({ "i", "v", "n", "s" }, "<C-s>", function()
|
||||||
|
vim.cmd([[w]])
|
||||||
|
end, {}, "Save file")
|
||||||
|
|
||||||
|
map({ "i", "v", "n", "s" }, "<leader>ww", function()
|
||||||
|
vim.cmd([[w]])
|
||||||
|
end, {}, "Save file")
|
||||||
|
|
||||||
|
-- Better up/down on wrapped lines
|
||||||
|
map("n", "j", "v:count == 0 ? 'gj' : 'j'", { expr = true, silent = true })
|
||||||
|
map("n", "k", "v:count == 0 ? 'gk' : 'k'", { expr = true, silent = true })
|
||||||
|
|
||||||
|
-- =============================================================================
|
||||||
|
-- Window management
|
||||||
|
-- =============================================================================
|
||||||
|
-- Navigation (normal + terminal)
|
||||||
map({ "t", "i" }, "<C-h>", [[<C-\><C-N><C-w>h]])
|
map({ "t", "i" }, "<C-h>", [[<C-\><C-N><C-w>h]])
|
||||||
map({ "t", "i" }, "<C-j>", [[<C-\><C-N><C-w>j]])
|
map({ "t", "i" }, "<C-j>", [[<C-\><C-N><C-w>j]])
|
||||||
map({ "t", "i" }, "<C-k>", [[<C-\><C-N><C-w>k]])
|
map({ "t", "i" }, "<C-k>", [[<C-\><C-N><C-w>k]])
|
||||||
map({ "t", "i" }, "<C-l>", [[<C-\><C-N><C-w>l]])
|
map({ "t", "i" }, "<C-l>", [[<C-\><C-N><C-w>l]])
|
||||||
-- Move to window using the <ctrl> hjkl keys
|
|
||||||
map("n", "<C-h>", "<C-w>h", { desc = "Go to left window" })
|
|
||||||
map("n", "<C-j>", "<C-w>j", { desc = "Go to lower window" })
|
|
||||||
map("n", "<C-k>", "<C-w>k", { desc = "Go to upper window" })
|
|
||||||
map("n", "<C-l>", "<C-w>l", { desc = "Go to right window" })
|
|
||||||
map("n", "<C-Up>", "<cmd>resize +2<cr>", { desc = "Increase window height" })
|
|
||||||
map("n", "<C-Down>", "<cmd>resize -2<cr>", { desc = "Decrease window height" })
|
|
||||||
map(
|
|
||||||
"n",
|
|
||||||
"<C-Left>",
|
|
||||||
"<cmd>vertical resize -2<cr>",
|
|
||||||
{ desc = "Decrease window width" }
|
|
||||||
)
|
|
||||||
map(
|
|
||||||
"n",
|
|
||||||
"<C-Right>",
|
|
||||||
"<cmd>vertical resize +2<cr>",
|
|
||||||
{ desc = "Increase window width" }
|
|
||||||
)
|
|
||||||
map("n", "<leader>sh", "<C-W>s", { desc = "Split window below" })
|
|
||||||
map("n", "<leader>sv", "<C-W>v", { desc = "Split window right" })
|
|
||||||
|
|
||||||
map({ "i", "v", "n", "s" }, "<C-s>", function()
|
map("n", "<C-h>", "<C-w>h", {}, "Go to left window")
|
||||||
vim.cmd([[w]])
|
map("n", "<C-j>", "<C-w>j", {}, "Go to lower window")
|
||||||
end, { desc = "Save file" })
|
map("n", "<C-k>", "<C-w>k", {}, "Go to upper window")
|
||||||
|
map("n", "<C-l>", "<C-w>l", {}, "Go to right window")
|
||||||
|
|
||||||
map({ "i", "v", "n", "s" }, "<leader>ww", function()
|
-- Resize
|
||||||
vim.cmd([[w]])
|
map("n", "<C-Up>", "<cmd>resize +2<cr>", {}, "Increase window height")
|
||||||
end, { desc = "Save file" })
|
map("n", "<C-Down>", "<cmd>resize -2<cr>", {}, "Decrease window height")
|
||||||
|
map("n", "<C-Left>", "<cmd>vertical resize -2<cr>", {}, "Decrease window width")
|
||||||
|
map("n", "<C-Right>", "<cmd>vertical resize +2<cr>", {}, "Increase window width")
|
||||||
|
|
||||||
map("n", "j", "v:count == 0 ? 'gj' : 'j'", { expr = true, silent = true })
|
-- Splits
|
||||||
map("n", "k", "v:count == 0 ? 'gk' : 'k'", { expr = true, silent = true })
|
map("n", "<leader>wh", "<C-W>s", {}, "Split window below")
|
||||||
|
map("n", "<leader>wv", "<C-W>v", {}, "Split window right")
|
||||||
|
map("n", "<leader>wd", "<C-W>c", {}, "Close window")
|
||||||
|
map("n", "<leader>wo", "<C-W>o", {}, "Close other windows")
|
||||||
|
map("n", "<leader>w=", "<C-W>=", {}, "Equalize windows")
|
||||||
|
|
||||||
-- === Terminal === "
|
-- =============================================================================
|
||||||
-- Mapping to open terminal emulator in nvim
|
-- Terminal
|
||||||
-- open terminal on alt+t
|
-- =============================================================================
|
||||||
map({ "n", "t" }, "<M-t>", function()
|
map({ "n", "t" }, "<M-t>", function()
|
||||||
vim.cmd.split({ "term://" .. vim.env.SHELL })
|
vim.cmd.split({ "term://" .. vim.env.SHELL })
|
||||||
vim.cmd.resize({ 15 })
|
vim.cmd.resize({ 15 })
|
||||||
end)
|
end, {}, "Toggle terminal")
|
||||||
-- mapping to close terminal emulator
|
|
||||||
map("t", "<M-t>", [[<C-\><C-n>:bd!<CR>]])
|
map("t", "<M-t>", [[<C-\><C-n>:bd!<CR>]], {}, "Close terminal")
|
||||||
|
|
||||||
|
-- =============================================================================
|
||||||
|
-- Visual mode indent
|
||||||
|
-- =============================================================================
|
||||||
|
map("v", "<Tab>", ">gv", { noremap = true, silent = true }, "Indent selection")
|
||||||
|
map("v", "<S-Tab>", "<gv", { noremap = true, silent = true }, "Unindent selection")
|
||||||
|
|
||||||
|
-- =============================================================================
|
||||||
|
-- Buffer
|
||||||
|
-- =============================================================================
|
||||||
|
map("n", "<leader>bn", "<cmd>bnext<cr>", {}, "Next buffer")
|
||||||
|
map("n", "<leader>bp", "<cmd>bprevious<cr>", {}, "Previous buffer")
|
||||||
|
map("n", "<leader>bd", "<cmd>bdelete<cr>", {}, "Delete buffer")
|
||||||
|
map("n", "<leader>bD", "<cmd>bdelete!<cr>", {}, "Delete buffer (force)")
|
||||||
|
|
||||||
|
-- =============================================================================
|
||||||
|
-- Find (Telescope)
|
||||||
|
-- =============================================================================
|
||||||
|
local builtin = require("telescope.builtin")
|
||||||
|
|
||||||
|
map("n", "<leader>ff", builtin.find_files, {}, "Find files")
|
||||||
|
map("n", "<leader>fg", builtin.live_grep, {}, "Live grep")
|
||||||
|
map("n", "<leader>fb", builtin.buffers, {}, "Buffers")
|
||||||
|
map("n", "<leader>fh", builtin.help_tags, {}, "Help tags")
|
||||||
|
map("n", "<leader>fr", builtin.oldfiles, {}, "Recent files")
|
||||||
|
map("n", "<leader>fB", function()
|
||||||
|
require("telescope").extensions.file_browser.file_browser()
|
||||||
|
end, {}, "File browser")
|
||||||
|
|
||||||
|
-- =============================================================================
|
||||||
|
-- Git
|
||||||
|
-- =============================================================================
|
||||||
|
map("n", "<leader>gg", "<cmd>Neogit<cr>", {}, "Neogit")
|
||||||
|
map("n", "<leader>gd", "<cmd>DiffviewOpen<cr>", {}, "Diffview open")
|
||||||
|
map("n", "<leader>gD", "<cmd>DiffviewFileHistory %<cr>", {}, "Diffview file history")
|
||||||
|
map("n", "<leader>gq", "<cmd>DiffviewClose<cr>", {}, "Diffview close")
|
||||||
|
|
||||||
|
-- =============================================================================
|
||||||
|
-- Search
|
||||||
|
-- =============================================================================
|
||||||
|
map("n", "<leader>S", function()
|
||||||
|
require("spectre").toggle()
|
||||||
|
end, {}, "Toggle Spectre")
|
||||||
|
|
||||||
|
map("n", "<leader>sw", function()
|
||||||
|
require("spectre").open_visual({ select_word = true })
|
||||||
|
end, {}, "Search current word")
|
||||||
|
|
||||||
|
map("v", "<leader>sw", function()
|
||||||
|
require("spectre").open_visual()
|
||||||
|
end, {}, "Search current word")
|
||||||
|
|
||||||
|
map("n", "<leader>sf", function()
|
||||||
|
require("spectre").open_file_search({ select_word = true })
|
||||||
|
end, {}, "Search in current file")
|
||||||
|
|
||||||
|
-- =============================================================================
|
||||||
|
-- Todo Comments
|
||||||
|
-- =============================================================================
|
||||||
|
map("n", "]t", function()
|
||||||
|
require("todo-comments").jump_next()
|
||||||
|
end, {}, "Next todo comment")
|
||||||
|
|
||||||
|
map("n", "[t", function()
|
||||||
|
require("todo-comments").jump_prev()
|
||||||
|
end, {}, "Previous todo comment")
|
||||||
|
|
||||||
|
map("n", "<leader>st", "<cmd>TodoTelescope<cr>", {}, "Search todos")
|
||||||
|
map("n", "<leader>sT", "<cmd>TodoLocList<cr>", {}, "Search todos (LocList)")
|
||||||
|
|
||||||
|
-- =============================================================================
|
||||||
|
-- Test (Neotest)
|
||||||
|
-- =============================================================================
|
||||||
|
local neotest = require("neotest")
|
||||||
|
|
||||||
|
map("n", "<leader>tf", function()
|
||||||
|
neotest.run.run(vim.fn.expand("%"))
|
||||||
|
end, {}, "Run File")
|
||||||
|
|
||||||
|
map("n", "<leader>tt", function()
|
||||||
|
neotest.run.run()
|
||||||
|
end, {}, "Run Nearest")
|
||||||
|
|
||||||
|
map("n", "<leader>tw", function()
|
||||||
|
neotest.run.run(vim.loop.cwd())
|
||||||
|
end, {}, "Run Workspace")
|
||||||
|
|
||||||
|
map("n", "<leader>tr", function()
|
||||||
|
neotest.output.open({ short = true, auto_close = true })
|
||||||
|
end, {}, "Results (short)")
|
||||||
|
|
||||||
|
map("n", "<leader>tR", function()
|
||||||
|
neotest.output.open({ enter = true })
|
||||||
|
end, {}, "Results (full)")
|
||||||
|
|
||||||
|
-- =============================================================================
|
||||||
|
-- Run / Overseer
|
||||||
|
-- =============================================================================
|
||||||
|
map("n", "<leader>te", function()
|
||||||
|
require("overseer.template.run_watch_provider").pick_executable_and_run()
|
||||||
|
end, {}, "Run & Watch executable (Telescope)")
|
||||||
|
|
||||||
|
map("n", "<leader>to", "<cmd>OverseerToggle<cr>", {}, "Toggle Overseer")
|
||||||
|
map("n", "<leader>ts", "<cmd>OverseerRun<cr>", {}, "Run Overseer")
|
||||||
|
|
||||||
|
-- =============================================================================
|
||||||
|
-- Debug (nvim-dap)
|
||||||
|
-- =============================================================================
|
||||||
|
local dap = require("dap")
|
||||||
|
local dapui = require("dapui")
|
||||||
|
local pb = require("persistent-breakpoints.api")
|
||||||
|
|
||||||
|
map("n", "<leader>db", pb.toggle_breakpoint, {}, "Toggle breakpoint")
|
||||||
|
map("n", "<leader>dB", function()
|
||||||
|
pb.set_conditional_breakpoint()
|
||||||
|
end, {}, "Conditional breakpoint")
|
||||||
|
map("n", "<leader>dc", dap.continue, {}, "Continue")
|
||||||
|
map("n", "<leader>dO", dap.step_over, {}, "Step over")
|
||||||
|
map("n", "<leader>di", dap.step_into, {}, "Step into")
|
||||||
|
map("n", "<leader>do", dap.step_out, {}, "Step out")
|
||||||
|
map("n", "<leader>dr", dap.run_to_cursor, {}, "Run to cursor")
|
||||||
|
map("n", "<leader>dd", dapui.toggle, {}, "Toggle DAP UI")
|
||||||
|
map("n", "<leader>dq", function()
|
||||||
|
dap.terminate()
|
||||||
|
end, {}, "Terminate debug")
|
||||||
|
|
||||||
|
-- =============================================================================
|
||||||
|
-- LSP (buffer-local via LspAttach)
|
||||||
|
-- =============================================================================
|
||||||
|
vim.api.nvim_create_autocmd("LspAttach", {
|
||||||
|
group = vim.api.nvim_create_augroup("UserLspKeymaps", { clear = true }),
|
||||||
|
callback = function(ev)
|
||||||
|
local bufnr = ev.buf
|
||||||
|
local client = vim.lsp.get_client_by_id(ev.data.client_id)
|
||||||
|
if not client then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
local opts = { buffer = bufnr, silent = true }
|
||||||
|
local autocmd = vim.api.nvim_create_autocmd
|
||||||
|
|
||||||
|
-- Hover & Signature
|
||||||
|
if client.server_capabilities.hoverProvider then
|
||||||
|
map("n", "K", vim.lsp.buf.hover, opts, "Hover")
|
||||||
|
end
|
||||||
|
if client.server_capabilities.signatureHelpProvider then
|
||||||
|
map("n", "<leader>k", vim.lsp.buf.signature_help, opts, "Signature help")
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Goto
|
||||||
|
if client.server_capabilities.declarationProvider then
|
||||||
|
map("n", "gD", vim.lsp.buf.declaration, opts, "Go to declaration")
|
||||||
|
end
|
||||||
|
if client.server_capabilities.definitionProvider then
|
||||||
|
map("n", "gd", function()
|
||||||
|
if utils.has("lspsaga.nvim") then
|
||||||
|
vim.cmd([[Lspsaga goto_definition]])
|
||||||
|
else
|
||||||
|
vim.lsp.buf.definition()
|
||||||
|
end
|
||||||
|
end, opts, "Go to definition")
|
||||||
|
if utils.has("lspsaga.nvim") then
|
||||||
|
map("n", "<leader>lp", function()
|
||||||
|
vim.cmd([[Lspsaga peek_definition]])
|
||||||
|
end, opts, "Peek definition")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if client.server_capabilities.typeDefinitionProvider then
|
||||||
|
map("n", "gt", function()
|
||||||
|
if utils.has("lspsaga.nvim") then
|
||||||
|
vim.cmd([[Lspsaga goto_type_definition]])
|
||||||
|
else
|
||||||
|
vim.lsp.buf.type_definition()
|
||||||
|
end
|
||||||
|
end, opts, "Go to type definition")
|
||||||
|
if utils.has("lspsaga.nvim") then
|
||||||
|
map("n", "<leader>lP", function()
|
||||||
|
vim.cmd([[Lspsaga peek_type_definition]])
|
||||||
|
end, opts, "Peek type definition")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if client.server_capabilities.implementationProvider then
|
||||||
|
map("n", "gi", function()
|
||||||
|
if utils.has("lspsaga.nvim") then
|
||||||
|
vim.cmd([[Lspsaga finder imp+def]])
|
||||||
|
else
|
||||||
|
vim.lsp.buf.implementation()
|
||||||
|
end
|
||||||
|
end, opts, "Go to implementation")
|
||||||
|
end
|
||||||
|
if client.server_capabilities.referencesProvider then
|
||||||
|
map("n", "gr", function()
|
||||||
|
if utils.has("lspsaga.nvim") then
|
||||||
|
vim.cmd([[Lspsaga finder ref]])
|
||||||
|
else
|
||||||
|
vim.lsp.buf.references({})
|
||||||
|
end
|
||||||
|
end, opts, "Go to references")
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Document Highlight (references under cursor)
|
||||||
|
if client.server_capabilities.documentHighlightProvider then
|
||||||
|
vim.api.nvim_set_hl(0, "LspReferenceRead", { link = "DiffText" })
|
||||||
|
vim.api.nvim_set_hl(0, "LspReferenceText", { link = "IncSearch" })
|
||||||
|
vim.api.nvim_set_hl(0, "LspReferenceWrite", { link = "WildMenu" })
|
||||||
|
|
||||||
|
local doc_highlight = vim.api.nvim_create_augroup("lsp_document_highlight", { clear = true })
|
||||||
|
local enable_highlight = function()
|
||||||
|
autocmd({ "CursorHold", "CursorHoldI" }, {
|
||||||
|
group = doc_highlight,
|
||||||
|
buffer = bufnr,
|
||||||
|
callback = vim.lsp.buf.document_highlight,
|
||||||
|
})
|
||||||
|
autocmd("CursorMoved", {
|
||||||
|
group = doc_highlight,
|
||||||
|
buffer = bufnr,
|
||||||
|
callback = vim.lsp.buf.clear_references,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
local disable_highlight = function()
|
||||||
|
vim.lsp.buf.clear_references()
|
||||||
|
vim.api.nvim_clear_autocmds({ buffer = bufnr, group = doc_highlight })
|
||||||
|
end
|
||||||
|
|
||||||
|
map("n", "<leader>uh", function()
|
||||||
|
utils.toggle("highlight", {}, { enable_highlight, disable_highlight })
|
||||||
|
local fn = vim.b[vim.fn.bufnr()]["highlight"]
|
||||||
|
if fn then
|
||||||
|
fn()
|
||||||
|
end
|
||||||
|
end, opts, "Toggle document highlight")
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Symbols
|
||||||
|
if client.server_capabilities.documentSymbolProvider then
|
||||||
|
map("n", "<leader>ls", vim.lsp.buf.document_symbol, opts, "Document symbols")
|
||||||
|
end
|
||||||
|
if client.server_capabilities.workspaceSymbolProvider then
|
||||||
|
map("n", "<leader>lS", vim.lsp.buf.workspace_symbol, opts, "Workspace symbols")
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Code Action & Rename
|
||||||
|
if client.server_capabilities.codeActionProvider then
|
||||||
|
map({ "n", "v" }, "<leader>ca", function()
|
||||||
|
if utils.has("lspsaga.nvim") then
|
||||||
|
vim.cmd([[Lspsaga code_action]])
|
||||||
|
else
|
||||||
|
vim.lsp.buf.code_action()
|
||||||
|
end
|
||||||
|
end, opts, "Code action")
|
||||||
|
end
|
||||||
|
if client.server_capabilities.renameProvider then
|
||||||
|
map("n", "<leader>cr", vim.lsp.buf.rename, opts, "Rename")
|
||||||
|
if utils.has("lspsaga.nvim") then
|
||||||
|
map("n", "<leader>cR", function()
|
||||||
|
vim.cmd([[Lspsaga project_replace]])
|
||||||
|
end, opts, "Rename workspace")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Calls
|
||||||
|
if client.server_capabilities.callHierarchyProvider then
|
||||||
|
map("n", "<leader>ci", function()
|
||||||
|
if utils.has("lspsaga.nvim") then
|
||||||
|
vim.cmd([[Lspsaga incoming_calls]])
|
||||||
|
else
|
||||||
|
vim.lsp.buf.incoming_calls()
|
||||||
|
end
|
||||||
|
end, opts, "Incoming calls")
|
||||||
|
map("n", "<leader>co", function()
|
||||||
|
if utils.has("lspsaga.nvim") then
|
||||||
|
vim.cmd([[Lspsaga outgoing_calls]])
|
||||||
|
else
|
||||||
|
vim.lsp.buf.outgoing_calls()
|
||||||
|
end
|
||||||
|
end, opts, "Outgoing calls")
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Formatting
|
||||||
|
if client.server_capabilities.documentFormattingProvider then
|
||||||
|
map("n", "<leader>cf", function()
|
||||||
|
vim.lsp.buf.format({ async = true })
|
||||||
|
end, opts, "Format buffer")
|
||||||
|
end
|
||||||
|
if client.server_capabilities.documentRangeFormattingProvider then
|
||||||
|
map("v", "<leader>cf", function()
|
||||||
|
vim.lsp.buf.format({ async = true })
|
||||||
|
end, opts, "Format selection")
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Diagnostics
|
||||||
|
map("n", "[d", function()
|
||||||
|
if utils.has("lspsaga.nvim") then
|
||||||
|
vim.cmd([[Lspsaga diagnostic_jump_prev]])
|
||||||
|
else
|
||||||
|
vim.diagnostic.jump({ count = -1, float = true })
|
||||||
|
end
|
||||||
|
end, opts, "Previous diagnostic")
|
||||||
|
map("n", "]d", function()
|
||||||
|
if utils.has("lspsaga.nvim") then
|
||||||
|
vim.cmd([[Lspsaga diagnostic_jump_next]])
|
||||||
|
else
|
||||||
|
vim.diagnostic.jump({ count = 1, float = true })
|
||||||
|
end
|
||||||
|
end, opts, "Next diagnostic")
|
||||||
|
map("n", "<leader>lf", vim.diagnostic.open_float, opts, "Line diagnostic")
|
||||||
|
map("n", "<leader>lq", vim.diagnostic.setloclist, opts, "Set loclist")
|
||||||
|
|
||||||
|
-- Lspsaga extras
|
||||||
|
if utils.has("lspsaga.nvim") then
|
||||||
|
map("n", "<leader>lw", function()
|
||||||
|
vim.cmd([[Lspsaga show_workspace_diagnostics]])
|
||||||
|
end, opts, "Workspace diagnostics")
|
||||||
|
map("n", "<leader>lb", function()
|
||||||
|
vim.cmd([[Lspsaga show_buf_diagnostics]])
|
||||||
|
end, opts, "Buffer diagnostics")
|
||||||
|
map("n", "<leader>lo", function()
|
||||||
|
vim.cmd([[Lspsaga outline]])
|
||||||
|
end, opts, "Outline")
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Workspace folders
|
||||||
|
map("n", "<leader>wf", function()
|
||||||
|
vim.print(vim.lsp.buf.list_workspace_folders())
|
||||||
|
end, opts, "List workspace folders")
|
||||||
|
|
||||||
|
map("n", "<leader>wr", function()
|
||||||
|
local clients = vim.lsp.get_clients()
|
||||||
|
if #clients > 0 then
|
||||||
|
local lsp = vim.lsp.status()
|
||||||
|
if lsp ~= "" then
|
||||||
|
print(lsp)
|
||||||
|
return
|
||||||
|
end
|
||||||
|
end
|
||||||
|
print("No LSP status available")
|
||||||
|
end, opts, "LSP ready check")
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
-- =============================================================================
|
||||||
|
-- UI Toggles (global)
|
||||||
|
-- =============================================================================
|
||||||
|
map("n", "<leader>us", function()
|
||||||
|
utils.toggle("enable_semantic_tokens", { global = true }, nil)
|
||||||
|
local enabled = vim.g["enable_semantic_tokens"]
|
||||||
|
for _, client in ipairs(vim.lsp.get_clients()) do
|
||||||
|
if client.server_capabilities.semanticTokensProvider then
|
||||||
|
for _, buf in ipairs(vim.api.nvim_list_bufs()) do
|
||||||
|
if vim.api.nvim_buf_is_loaded(buf) then
|
||||||
|
if enabled then
|
||||||
|
vim.lsp.semantic_tokens.start(buf, client.id)
|
||||||
|
else
|
||||||
|
vim.lsp.semantic_tokens.stop(buf, client.id)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end, {}, "Toggle semantic tokens")
|
||||||
|
vim.api.nvim_create_autocmd("BufWritePre", {
|
||||||
|
group = vim.api.nvim_create_augroup("LspFormat", { clear = true }),
|
||||||
|
callback = function(args)
|
||||||
|
if vim.g["autoformat"] then
|
||||||
|
vim.lsp.buf.format({ async = true, bufnr = args.buf })
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
-- =============================================================================
|
||||||
|
-- LSP Document Highlight jumps (lsp-document-highlight.nvim)
|
||||||
|
-- =============================================================================
|
||||||
|
map("n", "[[", function()
|
||||||
|
require("lsp-document-highlight").jump(-vim.v.count1, true)
|
||||||
|
end, {}, "Previous reference")
|
||||||
|
|
||||||
|
map("n", "]]", function()
|
||||||
|
require("lsp-document-highlight").jump(vim.v.count1, true)
|
||||||
|
end, {}, "Next reference")
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
local M = {}
|
||||||
|
|
||||||
|
function M.setup()
|
||||||
|
require("base16-colorscheme").setup({
|
||||||
|
-- Background tones
|
||||||
|
base00 = "{{colors.surface.default.hex}}", -- Default Background
|
||||||
|
base01 = "{{colors.surface_container.default.hex}}", -- Lighter Background (status bars)
|
||||||
|
base02 = "{{colors.surface_container_high.default.hex}}", -- Selection Background
|
||||||
|
base03 = "{{colors.outline.default.hex}}", -- Comments, Invisibles
|
||||||
|
-- Foreground tones
|
||||||
|
base04 = "{{colors.on_surface_variant.default.hex}}", -- Dark Foreground (status bars)
|
||||||
|
base05 = "{{colors.on_surface.default.hex}}", -- Default Foreground
|
||||||
|
base06 = "{{colors.on_surface.default.hex}}", -- Light Foreground
|
||||||
|
base07 = "{{colors.on_background.default.hex}}", -- Lightest Foreground
|
||||||
|
-- Accent colors
|
||||||
|
base08 = "{{colors.error.default.hex}}", -- Variables, XML Tags, Errors
|
||||||
|
base09 = "{{colors.tertiary.default.hex}}", -- Integers, Constants
|
||||||
|
base0A = "{{colors.secondary.default.hex}}", -- Classes, Search Background
|
||||||
|
base0B = "{{colors.primary.default.hex}}", -- Strings, Diff Inserted
|
||||||
|
base0C = "{{colors.tertiary_fixed_dim.default.hex}}", -- Regex, Escape Chars
|
||||||
|
base0D = "{{colors.primary_fixed_dim.default.hex}}", -- Functions, Methods
|
||||||
|
base0E = "{{colors.secondary_fixed_dim.default.hex}}", -- Keywords, Storage
|
||||||
|
base0F = "{{colors.error_container.default.hex}}", -- Deprecated, Embedded Tags
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Register a signal handler for SIGUSR1 (matugen updates)
|
||||||
|
local signal = vim.uv.new_signal()
|
||||||
|
signal:start(
|
||||||
|
"sigusr1",
|
||||||
|
vim.schedule_wrap(function()
|
||||||
|
package.loaded["matugen"] = nil
|
||||||
|
require("matugen").setup()
|
||||||
|
end)
|
||||||
|
)
|
||||||
|
|
||||||
|
return M
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
local M = {}
|
||||||
|
|
||||||
|
function M.setup()
|
||||||
|
require("base16-colorscheme").setup({
|
||||||
|
-- Background tones
|
||||||
|
base00 = "#000000", -- Default Background
|
||||||
|
base01 = "#110d1a", -- Lighter Background (status bars)
|
||||||
|
base02 = "#1a1428", -- Selection Background
|
||||||
|
base03 = "#644c94", -- Comments, Invisibles
|
||||||
|
-- Foreground tones
|
||||||
|
base04 = "#b58fff", -- Dark Foreground (status bars)
|
||||||
|
base05 = "#e8d8ff", -- Default Foreground
|
||||||
|
base06 = "#e8d8ff", -- Light Foreground
|
||||||
|
base07 = "#e8d8ff", -- Lightest Foreground
|
||||||
|
-- Accent colors
|
||||||
|
base08 = "#ff6f9b", -- Variables, XML Tags, Errors
|
||||||
|
base09 = "#d8b4ff", -- Integers, Constants
|
||||||
|
base0A = "#c79aff", -- Classes, Search Background
|
||||||
|
base0B = "#b58fff", -- Strings, Diff Inserted
|
||||||
|
base0C = "#bd80ff", -- Regex, Escape Chars
|
||||||
|
base0D = "#ab80ff", -- Functions, Methods
|
||||||
|
base0E = "#b880ff", -- Keywords, Storage
|
||||||
|
base0F = "#bc0039", -- Deprecated, Embedded Tags
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Register a signal handler for SIGUSR1 (matugen updates)
|
||||||
|
local signal = vim.uv.new_signal()
|
||||||
|
signal:start(
|
||||||
|
"sigusr1",
|
||||||
|
vim.schedule_wrap(function()
|
||||||
|
package.loaded["matugen"] = nil
|
||||||
|
require("matugen").setup()
|
||||||
|
end)
|
||||||
|
)
|
||||||
|
|
||||||
|
return M
|
||||||
@@ -0,0 +1,275 @@
|
|||||||
|
local overseer = require("overseer")
|
||||||
|
local parselib = require("overseer.parselib")
|
||||||
|
|
||||||
|
-- Shared output parser (CMake + GCC/Clang)
|
||||||
|
local function make_combined_parser()
|
||||||
|
local cmake_error_match = parselib.make_lua_match_fn("^CMake Error at (%S+):(%d+)%s*%((.*)%)%s*:%s*(.*)$")
|
||||||
|
local cmake_parse_fn = parselib.make_parse_fn(cmake_error_match, { "filename", "lnum", "type", "text" })
|
||||||
|
local cmake_parser = parselib.make_parser(cmake_parse_fn)
|
||||||
|
|
||||||
|
local gcc_parser = parselib.parser_from_errorformat(
|
||||||
|
"%f:%l:%c: %t%n %m," .. "%f:%l:%c: %t%*[^:]: %m," .. "%f:%l: %t%n %m," .. "%f:%l: %t%*[^:]: %m"
|
||||||
|
)
|
||||||
|
|
||||||
|
return parselib.combine_parsers({ cmake_parser, gcc_parser })
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Core builder used by every variant
|
||||||
|
local function build_task(params)
|
||||||
|
local cwd = vim.fn.fnamemodify(params.cwd or vim.fn.getcwd(), ":p")
|
||||||
|
local src = vim.fn.fnamemodify(params.src_dir, ":p")
|
||||||
|
local build = vim.fn.fnamemodify(params.build_dir, ":p")
|
||||||
|
|
||||||
|
local exts = {}
|
||||||
|
for ext in params.extensions:gmatch("[^,]+") do
|
||||||
|
local clean_ext = vim.trim(ext):gsub("^%.+", "")
|
||||||
|
table.insert(exts, clean_ext)
|
||||||
|
end
|
||||||
|
if #exts == 0 then
|
||||||
|
exts = { "cppm", "ixx", "cpp" }
|
||||||
|
end
|
||||||
|
|
||||||
|
local ext_pipe = table.concat(exts, "|")
|
||||||
|
local ext_comma = table.concat(exts, ",")
|
||||||
|
|
||||||
|
local script = string.format(
|
||||||
|
[[
|
||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
cd "%s"
|
||||||
|
SRC_DIR="%s"
|
||||||
|
BUILD_DIR="%s"
|
||||||
|
CMAKE="%s"
|
||||||
|
CMAKE_ARGS="%s"
|
||||||
|
BUILD_ARGS="%s"
|
||||||
|
|
||||||
|
echo "[overseer] CWD: $(pwd)"
|
||||||
|
echo "[overseer] SRC_DIR: $SRC_DIR"
|
||||||
|
echo "[overseer] BUILD_DIR: $BUILD_DIR"
|
||||||
|
echo "[overseer] Extensions: {%s}"
|
||||||
|
|
||||||
|
if [ ! -d "$SRC_DIR" ]; then
|
||||||
|
echo "[overseer] ERROR: Source directory does not exist: $SRC_DIR"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
mkdir -p "$BUILD_DIR"
|
||||||
|
|
||||||
|
rebuild() {
|
||||||
|
echo "[overseer] >>> Change detected. Reconfiguring..."
|
||||||
|
set -x
|
||||||
|
$CMAKE -S . -B "$BUILD_DIR" $CMAKE_ARGS
|
||||||
|
$CMAKE --build "$BUILD_DIR" $BUILD_ARGS
|
||||||
|
set +x
|
||||||
|
echo "[overseer] >>> Build complete. Watching..."
|
||||||
|
}
|
||||||
|
|
||||||
|
echo "[overseer] >>> Initial CMake configuration..."
|
||||||
|
rebuild
|
||||||
|
|
||||||
|
echo "[overseer] >>> Watching $SRC_DIR recursively for .{%s} files..."
|
||||||
|
while true; do
|
||||||
|
if command -v inotifywait >/dev/null 2>&1; then
|
||||||
|
inotifywait -r -e create,modify,move,delete --include ".*\.(%s)$" -q "$SRC_DIR" 2>/dev/null || true
|
||||||
|
rebuild
|
||||||
|
elif command -v fswatch >/dev/null 2>&1; then
|
||||||
|
fswatch -r -e ".*" -i "\.(%s)$" --event Created --event Updated --event Removed "$SRC_DIR" | head -n 1 >/dev/null
|
||||||
|
rebuild
|
||||||
|
else
|
||||||
|
echo "[overseer] ERROR: Install inotifywait (Linux) or fswatch (macOS)"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
]],
|
||||||
|
cwd,
|
||||||
|
src,
|
||||||
|
build,
|
||||||
|
params.cmake,
|
||||||
|
params.cmake_args,
|
||||||
|
params.build_args,
|
||||||
|
ext_comma,
|
||||||
|
ext_comma,
|
||||||
|
ext_pipe,
|
||||||
|
ext_pipe
|
||||||
|
)
|
||||||
|
|
||||||
|
return {
|
||||||
|
cmd = { "bash", "-c", script },
|
||||||
|
cwd = cwd,
|
||||||
|
name = string.format("CMake Watcher [%s]", params.src_dir),
|
||||||
|
components = {
|
||||||
|
"default",
|
||||||
|
{ "on_output_parse", parser = make_combined_parser() },
|
||||||
|
{ "on_output_quickfix", open = false, close = true },
|
||||||
|
"on_result_diagnostics",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Parameter schema for the [Custom] variant
|
||||||
|
local custom_params = {
|
||||||
|
src_dir = {
|
||||||
|
desc = "Source directory to watch recursively",
|
||||||
|
type = "string",
|
||||||
|
default = "src",
|
||||||
|
order = 1,
|
||||||
|
},
|
||||||
|
build_dir = {
|
||||||
|
desc = "CMake build directory",
|
||||||
|
type = "string",
|
||||||
|
default = "build",
|
||||||
|
order = 2,
|
||||||
|
},
|
||||||
|
cmake = {
|
||||||
|
desc = "CMake executable",
|
||||||
|
type = "string",
|
||||||
|
default = "cmake",
|
||||||
|
order = 3,
|
||||||
|
},
|
||||||
|
cmake_args = {
|
||||||
|
desc = "CMake config args (space-separated)",
|
||||||
|
type = "string",
|
||||||
|
order = 4,
|
||||||
|
},
|
||||||
|
build_args = {
|
||||||
|
desc = "CMake build args (space-separated)",
|
||||||
|
type = "string",
|
||||||
|
default = "-j32",
|
||||||
|
order = 5,
|
||||||
|
},
|
||||||
|
extensions = {
|
||||||
|
desc = "Extensions to watch (comma-separated)",
|
||||||
|
type = "string",
|
||||||
|
default = "cppm,ixx,cpp",
|
||||||
|
order = 6,
|
||||||
|
},
|
||||||
|
cwd = {
|
||||||
|
desc = "Working directory",
|
||||||
|
type = "string",
|
||||||
|
default = vim.fn.getcwd(),
|
||||||
|
order = 7,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
---@type overseer.TemplateFileProvider
|
||||||
|
return {
|
||||||
|
generator = function(search)
|
||||||
|
local cwd = vim.fn.getcwd()
|
||||||
|
|
||||||
|
-- Add/remove presets here as needed
|
||||||
|
local presets = {
|
||||||
|
{
|
||||||
|
name = "cmake watcher [debug]",
|
||||||
|
desc = "watch src/ with debug configuration",
|
||||||
|
params = {
|
||||||
|
src_dir = "src",
|
||||||
|
build_dir = "build",
|
||||||
|
cmake = "cmake",
|
||||||
|
cmake_args = "-DCMAKE_BUILD_TYPE=Debug -G Ninja -DCMAKE_EXPORT_COMPILE_COMMANDS=ON",
|
||||||
|
build_args = "-j32",
|
||||||
|
extensions = "cppm,ixx,cpp",
|
||||||
|
cwd = cwd,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name = "cmake watcher [release]",
|
||||||
|
desc = "watch src/ with release configuration",
|
||||||
|
params = {
|
||||||
|
src_dir = "src",
|
||||||
|
build_dir = "build",
|
||||||
|
cmake = "cmake",
|
||||||
|
cmake_args = "-DCMAKE_BUILD_TYPE=Release -G Ninja -DCMAKE_EXPORT_COMPILE_COMMANDS=ON",
|
||||||
|
build_args = "-j32",
|
||||||
|
extensions = "cppm,ixx,cpp",
|
||||||
|
cwd = cwd,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name = "cmake watcher [relwithdebinfo]",
|
||||||
|
desc = "watch src/ with relwithdebinfo configuration",
|
||||||
|
params = {
|
||||||
|
src_dir = "src",
|
||||||
|
build_dir = "build",
|
||||||
|
cmake = "cmake",
|
||||||
|
cmake_args = "-DCMAKE_BUILD_TYPE=RelWithDebInfo -G Ninja -DCMAKE_EXPORT_COMPILE_COMMANDS=ON",
|
||||||
|
build_args = "-j32",
|
||||||
|
extensions = "cppm,ixx,cpp",
|
||||||
|
cwd = cwd,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name = "cmake watcher [debug, qt]",
|
||||||
|
desc = "watch src/ with debug configuration",
|
||||||
|
params = {
|
||||||
|
src_dir = "src",
|
||||||
|
build_dir = "build",
|
||||||
|
cmake = "cmake",
|
||||||
|
cmake_args = '-G Ninja -DCMAKE_CXX_COMPILER=/usr/bin/clang++ --install-prefix "$PWD/release" -DQT_DEPLOY_USE_PATCHELF=ON -DVLW_ENABLE_DEV=ON -DCMAKE_BUILD_TYPE=Debug -DCMAKE_EXPORT_COMPILE_COMMANDS=ON',
|
||||||
|
build_args = "-j32",
|
||||||
|
extensions = "cppm,ixx,cpp",
|
||||||
|
cwd = cwd,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name = "cmake watcher [release,qt]",
|
||||||
|
desc = "watch src/ with release configuration",
|
||||||
|
params = {
|
||||||
|
src_dir = "src",
|
||||||
|
build_dir = "build",
|
||||||
|
cmake = "cmake",
|
||||||
|
cmake_args = '-G Ninja -DCMAKE_CXX_COMPILER=/usr/bin/clang++ --install-prefix "$PWD/release" -DQT_DEPLOY_USE_PATCHELF=ON -DVLW_ENABLE_DEV=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_EXPORT_COMPILE_COMMANDS=ON',
|
||||||
|
build_args = "-j32",
|
||||||
|
extensions = "cppm,ixx,cpp",
|
||||||
|
cwd = cwd,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name = "cmake watcher [relwithdebinfo,qt]",
|
||||||
|
desc = "watch src/ with relwithdebinfo configuration",
|
||||||
|
params = {
|
||||||
|
src_dir = "src",
|
||||||
|
build_dir = "build",
|
||||||
|
cmake = "cmake",
|
||||||
|
cmake_args = '-G Ninja -DCMAKE_CXX_COMPILER=/usr/bin/clang++ --install-prefix "$PWD/release" -DQT_DEPLOY_USE_PATCHELF=ON -DVLW_ENABLE_DEV=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_EXPORT_COMPILE_COMMANDS=ON',
|
||||||
|
build_args = "-j32",
|
||||||
|
extensions = "cppm,ixx,cpp",
|
||||||
|
cwd = cwd,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
local templates = {}
|
||||||
|
|
||||||
|
-- Presets: hardcoded args, no prompt
|
||||||
|
for _, preset in ipairs(presets) do
|
||||||
|
table.insert(templates, {
|
||||||
|
name = preset.name,
|
||||||
|
desc = preset.desc,
|
||||||
|
builder = function()
|
||||||
|
return build_task(preset.params)
|
||||||
|
end,
|
||||||
|
tags = { overseer.TAG.BUILD },
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Custom: overseer will prompt for params before running
|
||||||
|
table.insert(templates, {
|
||||||
|
name = "CMake Watcher [Custom]",
|
||||||
|
desc = "Watch with fully customizable parameters",
|
||||||
|
builder = function(params)
|
||||||
|
return build_task(params)
|
||||||
|
end,
|
||||||
|
params = custom_params,
|
||||||
|
tags = { overseer.TAG.BUILD },
|
||||||
|
})
|
||||||
|
|
||||||
|
return templates
|
||||||
|
end,
|
||||||
|
|
||||||
|
condition = {
|
||||||
|
callback = function(search)
|
||||||
|
return vim.fn.filereadable(vim.fs.joinpath(search.dir, "CMakeLists.txt")) == 1
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
||||||
@@ -0,0 +1,260 @@
|
|||||||
|
local overseer = require("overseer")
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
-- Core builder
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
local function build_task(params)
|
||||||
|
local executable = vim.fn.fnamemodify(params.executable, ":p")
|
||||||
|
local watch_dir = vim.fn.fnamemodify(executable, ":h")
|
||||||
|
local basename = vim.fn.fnamemodify(executable, ":t")
|
||||||
|
|
||||||
|
if vim.fn.filereadable(executable) == 0 then
|
||||||
|
vim.notify("Executable not found: " .. executable, vim.log.levels.ERROR)
|
||||||
|
return nil
|
||||||
|
end
|
||||||
|
|
||||||
|
if vim.fn.executable(executable) ~= 1 then
|
||||||
|
vim.notify("File is not executable: " .. executable, vim.log.levels.ERROR)
|
||||||
|
return nil
|
||||||
|
end
|
||||||
|
|
||||||
|
local script = string.format(
|
||||||
|
[[
|
||||||
|
#!/bin/bash
|
||||||
|
set -euo pipefail
|
||||||
|
set -m
|
||||||
|
|
||||||
|
EXECUTABLE="%s"
|
||||||
|
WATCH_DIR="%s"
|
||||||
|
BASENAME="%s"
|
||||||
|
|
||||||
|
echo "[overseer] Executable: $EXECUTABLE"
|
||||||
|
echo "[overseer] Watch dir: $WATCH_DIR"
|
||||||
|
echo "[overseer] Basename: $BASENAME"
|
||||||
|
|
||||||
|
cleanup() {
|
||||||
|
if [ -n "${PID:-}" ] && kill -0 "$PID" 2>/dev/null; then
|
||||||
|
echo "[overseer] Stopping process group $PID..."
|
||||||
|
kill -TERM -"$PID" 2>/dev/null || true
|
||||||
|
for i in {1..20}; do
|
||||||
|
kill -0 "$PID" 2>/dev/null || break
|
||||||
|
sleep 0.1
|
||||||
|
done
|
||||||
|
if kill -0 "$PID" 2>/dev/null; then
|
||||||
|
kill -KILL -"$PID" 2>/dev/null || true
|
||||||
|
fi
|
||||||
|
wait "$PID" 2>/dev/null || true
|
||||||
|
fi
|
||||||
|
PID=""
|
||||||
|
}
|
||||||
|
trap cleanup EXIT
|
||||||
|
|
||||||
|
run() {
|
||||||
|
echo "[overseer] >>> Starting $BASENAME..."
|
||||||
|
"$EXECUTABLE" &
|
||||||
|
PID=$!
|
||||||
|
}
|
||||||
|
|
||||||
|
run
|
||||||
|
|
||||||
|
exec 3< <(inotifywait -m -e close_write,moved_to --format '%%f' "$WATCH_DIR")
|
||||||
|
INOTIFY_PID=$!
|
||||||
|
|
||||||
|
trap 'kill $INOTIFY_PID 2>/dev/null || true; wait $INOTIFY_PID 2>/dev/null || true; cleanup' EXIT
|
||||||
|
|
||||||
|
while read -r file <&3; do
|
||||||
|
if [ "$file" = "$BASENAME" ]; then
|
||||||
|
sleep 0.1
|
||||||
|
cleanup
|
||||||
|
run
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
kill $INOTIFY_PID 2>/dev/null || true
|
||||||
|
wait $INOTIFY_PID 2>/dev/null || true
|
||||||
|
echo "[overseer] Watch ended"
|
||||||
|
]],
|
||||||
|
executable,
|
||||||
|
watch_dir,
|
||||||
|
basename
|
||||||
|
)
|
||||||
|
|
||||||
|
return {
|
||||||
|
cmd = { "bash", "-c", script },
|
||||||
|
cwd = watch_dir,
|
||||||
|
name = string.format("Run & Watch [%s]", basename),
|
||||||
|
components = {
|
||||||
|
"default",
|
||||||
|
{ "on_output_quickfix", open = false, close = true },
|
||||||
|
},
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
-- Scan for executables
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
local function scan_executables(root)
|
||||||
|
local candidates = {}
|
||||||
|
local seen = {}
|
||||||
|
|
||||||
|
local function try_add(path)
|
||||||
|
if not seen[path] and vim.fn.filereadable(path) == 1 and vim.fn.executable(path) == 1 then
|
||||||
|
seen[path] = true
|
||||||
|
table.insert(candidates, path)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Root directory (non-recursive)
|
||||||
|
local handle = vim.uv.fs_scandir(root)
|
||||||
|
if handle then
|
||||||
|
while true do
|
||||||
|
local name, typ = vim.uv.fs_scandir_next(handle)
|
||||||
|
if not name then
|
||||||
|
break
|
||||||
|
end
|
||||||
|
if typ == "file" then
|
||||||
|
try_add(root .. "/" .. name)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Common build directories (depth 1)
|
||||||
|
for _, sub in ipairs({
|
||||||
|
"build",
|
||||||
|
"bin",
|
||||||
|
"target/debug",
|
||||||
|
"target/release",
|
||||||
|
"cmake-build-debug",
|
||||||
|
"cmake-build-release",
|
||||||
|
"out",
|
||||||
|
"dist",
|
||||||
|
}) do
|
||||||
|
local dir = root .. "/" .. sub
|
||||||
|
if vim.fn.isdirectory(dir) == 1 then
|
||||||
|
local h = vim.uv.fs_scandir(dir)
|
||||||
|
if h then
|
||||||
|
while true do
|
||||||
|
local name, typ = vim.uv.fs_scandir_next(h)
|
||||||
|
if not name then
|
||||||
|
break
|
||||||
|
end
|
||||||
|
if typ == "file" then
|
||||||
|
try_add(dir .. "/" .. name)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Newest first
|
||||||
|
table.sort(candidates, function(a, b)
|
||||||
|
local sa = vim.uv.fs_stat(a)
|
||||||
|
local sb = vim.uv.fs_stat(b)
|
||||||
|
if not sa or not sb then
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
return sa.mtime.sec > sb.mtime.sec
|
||||||
|
end)
|
||||||
|
|
||||||
|
while #candidates > 8 do
|
||||||
|
table.remove(candidates)
|
||||||
|
end
|
||||||
|
|
||||||
|
return candidates
|
||||||
|
end
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
-- Template provider
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
local provider = {
|
||||||
|
generator = function(search)
|
||||||
|
local templates = {}
|
||||||
|
local cwd = search.dir or vim.fn.getcwd()
|
||||||
|
|
||||||
|
for _, exe in ipairs(scan_executables(cwd)) do
|
||||||
|
local name = vim.fn.fnamemodify(exe, ":t")
|
||||||
|
table.insert(templates, {
|
||||||
|
name = string.format("Run & Watch [%s]", name),
|
||||||
|
desc = string.format("Run %s and restart when the binary changes", exe),
|
||||||
|
builder = function()
|
||||||
|
return build_task({ executable = exe })
|
||||||
|
end,
|
||||||
|
tags = { overseer.TAG.RUN },
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
table.insert(templates, {
|
||||||
|
name = "Run & Watch [Custom]",
|
||||||
|
desc = "Provide the path to an executable to run and watch",
|
||||||
|
builder = function(params)
|
||||||
|
return build_task(params)
|
||||||
|
end,
|
||||||
|
params = {
|
||||||
|
executable = {
|
||||||
|
desc = "Path to executable",
|
||||||
|
type = "string",
|
||||||
|
order = 1,
|
||||||
|
validate = function(v)
|
||||||
|
if v == "" or v == nil then
|
||||||
|
return false, "Executable path is required"
|
||||||
|
end
|
||||||
|
local p = vim.fn.fnamemodify(v, ":p")
|
||||||
|
if vim.fn.filereadable(p) == 0 then
|
||||||
|
return false, "File does not exist"
|
||||||
|
end
|
||||||
|
if vim.fn.executable(p) ~= 1 then
|
||||||
|
return false, "File is not executable"
|
||||||
|
end
|
||||||
|
return true
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
tags = { overseer.TAG.RUN },
|
||||||
|
})
|
||||||
|
|
||||||
|
return templates
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
-- Telescope integration
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
provider.pick_executable_and_run = function()
|
||||||
|
local has_telescope, telescope = pcall(require, "telescope.builtin")
|
||||||
|
if not has_telescope then
|
||||||
|
vim.notify("Telescope.nvim is required", vim.log.levels.ERROR)
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
telescope.find_files({
|
||||||
|
prompt_title = "Select executable to run & watch",
|
||||||
|
find_command = { "find", ".", "-maxdepth", "3", "-type", "f", "-executable" },
|
||||||
|
attach_mappings = function(prompt_bufnr, _)
|
||||||
|
local actions = require("telescope.actions")
|
||||||
|
local action_state = require("telescope.actions.state")
|
||||||
|
|
||||||
|
actions.select_default:replace(function()
|
||||||
|
actions.close(prompt_bufnr)
|
||||||
|
local selection = action_state.get_selected_entry()
|
||||||
|
if not selection then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
local path = vim.fn.fnamemodify(selection.path or selection.value, ":p")
|
||||||
|
|
||||||
|
local task_defn = build_task({ executable = path })
|
||||||
|
if not task_defn then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
local task = overseer.new_task(task_defn)
|
||||||
|
task:start()
|
||||||
|
end)
|
||||||
|
return true
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
return provider
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
return {
|
||||||
|
"Civitasv/cmake-tools.nvim",
|
||||||
|
}
|
||||||
@@ -0,0 +1,97 @@
|
|||||||
|
return {
|
||||||
|
"xzbdmw/colorful-menu.nvim",
|
||||||
|
config = function()
|
||||||
|
-- You don't need to set these options.
|
||||||
|
require("colorful-menu").setup({
|
||||||
|
ls = {
|
||||||
|
lua_ls = {
|
||||||
|
-- Maybe you want to dim arguments a bit.
|
||||||
|
arguments_hl = "@comment",
|
||||||
|
},
|
||||||
|
gopls = {
|
||||||
|
-- By default, we render variable/function's type in the right most side,
|
||||||
|
-- to make them not to crowd together with the original label.
|
||||||
|
|
||||||
|
-- when true:
|
||||||
|
-- foo *Foo
|
||||||
|
-- ast "go/ast"
|
||||||
|
|
||||||
|
-- when false:
|
||||||
|
-- foo *Foo
|
||||||
|
-- ast "go/ast"
|
||||||
|
align_type_to_right = true,
|
||||||
|
-- When true, label for field and variable will format like "foo: Foo"
|
||||||
|
-- instead of go's original syntax "foo Foo". If align_type_to_right is
|
||||||
|
-- true, this option has no effect.
|
||||||
|
add_colon_before_type = false,
|
||||||
|
-- See https://github.com/xzbdmw/colorful-menu.nvim/pull/36
|
||||||
|
preserve_type_when_truncate = true,
|
||||||
|
},
|
||||||
|
-- for lsp_config or typescript-tools
|
||||||
|
ts_ls = {
|
||||||
|
-- false means do not include any extra info,
|
||||||
|
-- see https://github.com/xzbdmw/colorful-menu.nvim/issues/42
|
||||||
|
extra_info_hl = "@comment",
|
||||||
|
},
|
||||||
|
vtsls = {
|
||||||
|
-- false means do not include any extra info,
|
||||||
|
-- see https://github.com/xzbdmw/colorful-menu.nvim/issues/42
|
||||||
|
extra_info_hl = "@comment",
|
||||||
|
},
|
||||||
|
["rust-analyzer"] = {
|
||||||
|
-- Such as (as Iterator), (use std::io).
|
||||||
|
extra_info_hl = "@comment",
|
||||||
|
-- Similar to the same setting of gopls.
|
||||||
|
align_type_to_right = true,
|
||||||
|
-- See https://github.com/xzbdmw/colorful-menu.nvim/pull/36
|
||||||
|
preserve_type_when_truncate = true,
|
||||||
|
},
|
||||||
|
clangd = {
|
||||||
|
-- Such as "From <stdio.h>".
|
||||||
|
extra_info_hl = "@comment",
|
||||||
|
-- Similar to the same setting of gopls.
|
||||||
|
align_type_to_right = true,
|
||||||
|
-- the hl group of leading dot of "•std::filesystem::permissions(..)"
|
||||||
|
import_dot_hl = "@comment",
|
||||||
|
-- See https://github.com/xzbdmw/colorful-menu.nvim/pull/36
|
||||||
|
preserve_type_when_truncate = true,
|
||||||
|
},
|
||||||
|
zls = {
|
||||||
|
-- Similar to the same setting of gopls.
|
||||||
|
align_type_to_right = true,
|
||||||
|
},
|
||||||
|
roslyn = {
|
||||||
|
extra_info_hl = "@comment",
|
||||||
|
},
|
||||||
|
dartls = {
|
||||||
|
extra_info_hl = "@comment",
|
||||||
|
},
|
||||||
|
-- The same applies to pyright/pylance
|
||||||
|
basedpyright = {
|
||||||
|
-- It is usually import path such as "os"
|
||||||
|
extra_info_hl = "@comment",
|
||||||
|
},
|
||||||
|
pylsp = {
|
||||||
|
extra_info_hl = "@comment",
|
||||||
|
-- Dim the function argument area, which is the main
|
||||||
|
-- difference with pyright.
|
||||||
|
arguments_hl = "@comment",
|
||||||
|
},
|
||||||
|
-- If true, try to highlight "not supported" languages.
|
||||||
|
fallback = true,
|
||||||
|
-- this will be applied to label description for unsupported languages
|
||||||
|
fallback_extra_info_hl = "@comment",
|
||||||
|
},
|
||||||
|
-- If the built-in logic fails to find a suitable highlight group for a label,
|
||||||
|
-- this highlight is applied to the label.
|
||||||
|
fallback_highlight = "@variable",
|
||||||
|
-- If provided, the plugin truncates the final displayed text to
|
||||||
|
-- this width (measured in display cells). Any highlights that extend
|
||||||
|
-- beyond the truncation point are ignored. When set to a float
|
||||||
|
-- between 0 and 1, it'll be treated as percentage of the width of
|
||||||
|
-- the window: math.floor(max_width * vim.api.nvim_win_get_width(0))
|
||||||
|
-- Default 60.
|
||||||
|
max_width = 60,
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
}
|
||||||
@@ -1,97 +0,0 @@
|
|||||||
return {
|
|
||||||
"xzbdmw/colorful-menu.nvim",
|
|
||||||
config = function()
|
|
||||||
-- You don't need to set these options.
|
|
||||||
require("colorful-menu").setup({
|
|
||||||
ls = {
|
|
||||||
lua_ls = {
|
|
||||||
-- Maybe you want to dim arguments a bit.
|
|
||||||
arguments_hl = "@comment",
|
|
||||||
},
|
|
||||||
gopls = {
|
|
||||||
-- By default, we render variable/function's type in the right most side,
|
|
||||||
-- to make them not to crowd together with the original label.
|
|
||||||
|
|
||||||
-- when true:
|
|
||||||
-- foo *Foo
|
|
||||||
-- ast "go/ast"
|
|
||||||
|
|
||||||
-- when false:
|
|
||||||
-- foo *Foo
|
|
||||||
-- ast "go/ast"
|
|
||||||
align_type_to_right = true,
|
|
||||||
-- When true, label for field and variable will format like "foo: Foo"
|
|
||||||
-- instead of go's original syntax "foo Foo". If align_type_to_right is
|
|
||||||
-- true, this option has no effect.
|
|
||||||
add_colon_before_type = false,
|
|
||||||
-- See https://github.com/xzbdmw/colorful-menu.nvim/pull/36
|
|
||||||
preserve_type_when_truncate = true,
|
|
||||||
},
|
|
||||||
-- for lsp_config or typescript-tools
|
|
||||||
ts_ls = {
|
|
||||||
-- false means do not include any extra info,
|
|
||||||
-- see https://github.com/xzbdmw/colorful-menu.nvim/issues/42
|
|
||||||
extra_info_hl = "@comment",
|
|
||||||
},
|
|
||||||
vtsls = {
|
|
||||||
-- false means do not include any extra info,
|
|
||||||
-- see https://github.com/xzbdmw/colorful-menu.nvim/issues/42
|
|
||||||
extra_info_hl = "@comment",
|
|
||||||
},
|
|
||||||
["rust-analyzer"] = {
|
|
||||||
-- Such as (as Iterator), (use std::io).
|
|
||||||
extra_info_hl = "@comment",
|
|
||||||
-- Similar to the same setting of gopls.
|
|
||||||
align_type_to_right = true,
|
|
||||||
-- See https://github.com/xzbdmw/colorful-menu.nvim/pull/36
|
|
||||||
preserve_type_when_truncate = true,
|
|
||||||
},
|
|
||||||
clangd = {
|
|
||||||
-- Such as "From <stdio.h>".
|
|
||||||
extra_info_hl = "@comment",
|
|
||||||
-- Similar to the same setting of gopls.
|
|
||||||
align_type_to_right = true,
|
|
||||||
-- the hl group of leading dot of "•std::filesystem::permissions(..)"
|
|
||||||
import_dot_hl = "@comment",
|
|
||||||
-- See https://github.com/xzbdmw/colorful-menu.nvim/pull/36
|
|
||||||
preserve_type_when_truncate = true,
|
|
||||||
},
|
|
||||||
zls = {
|
|
||||||
-- Similar to the same setting of gopls.
|
|
||||||
align_type_to_right = true,
|
|
||||||
},
|
|
||||||
roslyn = {
|
|
||||||
extra_info_hl = "@comment",
|
|
||||||
},
|
|
||||||
dartls = {
|
|
||||||
extra_info_hl = "@comment",
|
|
||||||
},
|
|
||||||
-- The same applies to pyright/pylance
|
|
||||||
basedpyright = {
|
|
||||||
-- It is usually import path such as "os"
|
|
||||||
extra_info_hl = "@comment",
|
|
||||||
},
|
|
||||||
pylsp = {
|
|
||||||
extra_info_hl = "@comment",
|
|
||||||
-- Dim the function argument area, which is the main
|
|
||||||
-- difference with pyright.
|
|
||||||
arguments_hl = "@comment",
|
|
||||||
},
|
|
||||||
-- If true, try to highlight "not supported" languages.
|
|
||||||
fallback = true,
|
|
||||||
-- this will be applied to label description for unsupport languages
|
|
||||||
fallback_extra_info_hl = "@comment",
|
|
||||||
},
|
|
||||||
-- If the built-in logic fails to find a suitable highlight group for a label,
|
|
||||||
-- this highlight is applied to the label.
|
|
||||||
fallback_highlight = "@variable",
|
|
||||||
-- If provided, the plugin truncates the final displayed text to
|
|
||||||
-- this width (measured in display cells). Any highlights that extend
|
|
||||||
-- beyond the truncation point are ignored. When set to a float
|
|
||||||
-- between 0 and 1, it'll be treated as percentage of the width of
|
|
||||||
-- the window: math.floor(max_width * vim.api.nvim_win_get_width(0))
|
|
||||||
-- Default 60.
|
|
||||||
max_width = 60,
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
return {
|
||||||
|
"mr-u0b0dy/crazy-coverage.nvim",
|
||||||
|
config = function()
|
||||||
|
require("crazy-coverage").setup()
|
||||||
|
end,
|
||||||
|
}
|
||||||
@@ -0,0 +1,115 @@
|
|||||||
|
return {
|
||||||
|
"mfussenegger/nvim-dap",
|
||||||
|
dependencies = {
|
||||||
|
"rcarriga/nvim-dap-ui",
|
||||||
|
"nvim-neotest/nvim-nio",
|
||||||
|
"theHamsta/nvim-dap-virtual-text",
|
||||||
|
"Weissle/persistent-breakpoints.nvim",
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
local dap, dapui = require("dap"), require("dapui")
|
||||||
|
dapui.setup({})
|
||||||
|
dap.adapters = {
|
||||||
|
lldb = {
|
||||||
|
type = "executable",
|
||||||
|
command = "/usr/bin/lldb-dap",
|
||||||
|
name = "lldb",
|
||||||
|
},
|
||||||
|
codelldb = {
|
||||||
|
type = "executable",
|
||||||
|
command = "codelldb",
|
||||||
|
name = "codelldb",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
local pickers = require("telescope.pickers")
|
||||||
|
local finders = require("telescope.finders")
|
||||||
|
local conf = require("telescope.config").values
|
||||||
|
local actions = require("telescope.actions")
|
||||||
|
local action_state = require("telescope.actions.state")
|
||||||
|
dap.configurations = {
|
||||||
|
cpp = {
|
||||||
|
{
|
||||||
|
name = "Launch file(codelldb)",
|
||||||
|
type = "codelldb",
|
||||||
|
request = "launch",
|
||||||
|
program = function()
|
||||||
|
return coroutine.create(function(coro)
|
||||||
|
local opts = {}
|
||||||
|
pickers
|
||||||
|
.new(opts, {
|
||||||
|
prompt_title = "Path to executable",
|
||||||
|
finder = finders.new_oneshot_job(
|
||||||
|
{ "fd", "--hidden", "--no-ignore", "--type", "x" },
|
||||||
|
{}
|
||||||
|
),
|
||||||
|
sorter = conf.generic_sorter(opts),
|
||||||
|
attach_mappings = function(buffer_number)
|
||||||
|
actions.select_default:replace(function()
|
||||||
|
actions.close(buffer_number)
|
||||||
|
coroutine.resume(coro, action_state.get_selected_entry()[1])
|
||||||
|
end)
|
||||||
|
return true
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
:find()
|
||||||
|
end)
|
||||||
|
end,
|
||||||
|
cwd = "${workspaceFolder}",
|
||||||
|
stopOnEntry = false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name = "Launch(lldb-dap)",
|
||||||
|
type = "lldb",
|
||||||
|
request = "launch",
|
||||||
|
program = function()
|
||||||
|
return coroutine.create(function(coro)
|
||||||
|
local opts = {}
|
||||||
|
pickers
|
||||||
|
.new(opts, {
|
||||||
|
prompt_title = "Path to executable",
|
||||||
|
finder = finders.new_oneshot_job(
|
||||||
|
{ "fd", "--hidden", "--no-ignore", "--type", "x" },
|
||||||
|
{}
|
||||||
|
),
|
||||||
|
sorter = conf.generic_sorter(opts),
|
||||||
|
attach_mappings = function(buffer_number)
|
||||||
|
actions.select_default:replace(function()
|
||||||
|
actions.close(buffer_number)
|
||||||
|
coroutine.resume(coro, action_state.get_selected_entry()[1])
|
||||||
|
end)
|
||||||
|
return true
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
:find()
|
||||||
|
end)
|
||||||
|
end,
|
||||||
|
cwd = "${workspaceFolder}",
|
||||||
|
stopOnEntry = false,
|
||||||
|
args = {},
|
||||||
|
env = function()
|
||||||
|
local variables = {}
|
||||||
|
for k, v in pairs(vim.fn.environ()) do
|
||||||
|
table.insert(variables, string.format("%s=%s", k, v))
|
||||||
|
end
|
||||||
|
return variables
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
dap.listeners.before.attach.dapui_config = function()
|
||||||
|
dapui.open()
|
||||||
|
end
|
||||||
|
dap.listeners.before.launch.dapui_config = function()
|
||||||
|
dapui.open()
|
||||||
|
end
|
||||||
|
dap.listeners.before.event_terminated.dapui_config = function()
|
||||||
|
dapui.close()
|
||||||
|
end
|
||||||
|
dap.listeners.before.event_exited.dapui_config = function()
|
||||||
|
dapui.close()
|
||||||
|
end
|
||||||
|
require("persistent-breakpoints").setup({
|
||||||
|
load_breakpoints_event = { "BufReadPost" },
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
}
|
||||||
+28
-26
@@ -1,29 +1,31 @@
|
|||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"windwp/nvim-autopairs",
|
"windwp/nvim-autopairs",
|
||||||
event = "VeryLazy",
|
event = "VeryLazy",
|
||||||
config = function(_, opts)
|
config = function(_, opts)
|
||||||
require("nvim-autopairs").setup(opts)
|
require("nvim-autopairs").setup(opts)
|
||||||
end,
|
end,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"numToStr/Comment.nvim",
|
||||||
|
event = "VeryLazy",
|
||||||
|
config = function(_, opts)
|
||||||
|
require("Comment").setup(opts)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"folke/todo-comments.nvim",
|
||||||
|
event = "VeryLazy",
|
||||||
|
cmd = { "TodoTelescope", "TodoLocList" },
|
||||||
|
config = true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"numToStr/Comment.nvim",
|
"nvim-pack/nvim-spectre",
|
||||||
event = "VeryLazy",
|
},
|
||||||
config = function(_, opts)
|
{
|
||||||
require("Comment").setup(opts)
|
"LintaoAmons/cd-project.nvim",
|
||||||
end,
|
opts = {
|
||||||
},
|
auto_register_project = true,
|
||||||
{
|
},
|
||||||
"folke/todo-comments.nvim",
|
},
|
||||||
event = "VeryLazy",
|
|
||||||
cmd = { "TodoTelescope", "TodoLocList" },
|
|
||||||
config = true,
|
|
||||||
-- stylua: ignore
|
|
||||||
keys = {
|
|
||||||
{ "]t", function() require("todo-comments").jump_next() end, desc = "Next todo comment" },
|
|
||||||
{ "[t", function() require("todo-comments").jump_prev() end, desc = "Previous todo comment" },
|
|
||||||
{ "<leader>tt", "<cmd>TodoTelescope<cr>", desc = "List Todo in Telescope" },
|
|
||||||
{ "<leader>tl", "<cmd>TodoLocList<cr>", desc = "List Todo in LocList" },
|
|
||||||
},
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,119 +0,0 @@
|
|||||||
return {
|
|
||||||
{
|
|
||||||
"windwp/nvim-autopairs",
|
|
||||||
event = "VeryLazy",
|
|
||||||
config = function(_, opts)
|
|
||||||
require("nvim-autopairs").setup(opts)
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"numToStr/Comment.nvim",
|
|
||||||
event = "VeryLazy",
|
|
||||||
config = function(_, opts)
|
|
||||||
require("Comment").setup(opts)
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"folke/todo-comments.nvim",
|
|
||||||
event = "VeryLazy",
|
|
||||||
cmd = { "TodoTelescope", "TodoLocList" },
|
|
||||||
config = true,
|
|
||||||
-- stylua: ignore
|
|
||||||
keys = {
|
|
||||||
{ "]t", function() require("todo-comments").jump_next() end, desc = "Next todo comment" },
|
|
||||||
{ "[t", function() require("todo-comments").jump_prev() end, desc = "Previous todo comment" },
|
|
||||||
{ "<leader>tt", "<cmd>TodoTelescope<cr>", desc = "List Todo in Telescope" },
|
|
||||||
{ "<leader>tl", "<cmd>TodoLocList<cr>", desc = "List Todo in LocList" },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"nvimdev/dashboard-nvim",
|
|
||||||
init = function()
|
|
||||||
vim.cmd([[hi DashboardHeader guifg=#ee872d gui=bold]])
|
|
||||||
vim.cmd([[hi DashboardProjectTitle guifg=#d55fde gui=bold]])
|
|
||||||
vim.cmd([[hi DashboardProjectIcon guifg=#89ca78]])
|
|
||||||
vim.cmd([[hi DashboardMruTitle guifg=#d55fde gui=bold]])
|
|
||||||
vim.cmd([[hi DashboardShortCut guifg=#89ca78 gui=bold]])
|
|
||||||
end,
|
|
||||||
opts = {
|
|
||||||
theme = "hyper",
|
|
||||||
config = {
|
|
||||||
header = {
|
|
||||||
[[]],
|
|
||||||
[[███╗ ██╗███████╗ ██████╗ ██╗ ██╗██╗███╗ ███╗]],
|
|
||||||
[[████╗ ██║██╔�����██╔���██╗██║ ██║██║████╗ ████║]],
|
|
||||||
[[██╔██╗ ██║█████╗ ██║ ██║██║ ██║██║██╔████╔██║]],
|
|
||||||
[[██║╚██╗██║██╔â•�â•�â•� ██║ ██║╚██╗ â–ˆâ
|
|
||||||
–ˆâ•”â•�██║██║╚██╔â•�██║]],
|
|
||||||
[[██║ ╚████║███████╗╚██████╔� ╚████╔� ██║██║ ╚�� ██║]],
|
|
||||||
[[╚�� ╚����╚������� ╚������ ╚���� ╚��╚�� ╚��]],
|
|
||||||
[[]],
|
|
||||||
},
|
|
||||||
shortcut = {
|
|
||||||
{
|
|
||||||
icon = " ", --
|
|
||||||
desc = " Files",
|
|
||||||
group = "Label",
|
|
||||||
key = "f",
|
|
||||||
action = "Telescope find_files",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
desc = " Find text",
|
|
||||||
group = "@property",
|
|
||||||
key = "g",
|
|
||||||
action = "Telescope live_grep ",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
desc = "ï…› New file",
|
|
||||||
group = "Macro",
|
|
||||||
key = "n",
|
|
||||||
action = "NvimTreeToggle",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
desc = "� Config",
|
|
||||||
group = "DiagnosticHint",
|
|
||||||
key = "c",
|
|
||||||
action = "e $MYVIMRC ",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
desc = "� Quit",
|
|
||||||
group = "Number",
|
|
||||||
key = "q",
|
|
||||||
action = "qa",
|
|
||||||
},
|
|
||||||
-- {
|
|
||||||
-- desc = " Recent files",
|
|
||||||
-- group = "",
|
|
||||||
-- key = "r",
|
|
||||||
-- action = "Telescope oldfiles ",
|
|
||||||
-- },
|
|
||||||
-- {
|
|
||||||
-- desc = "󰊳 Update",
|
|
||||||
-- group = "@property",
|
|
||||||
-- key = "u",
|
|
||||||
-- action = "Lazy update",
|
|
||||||
-- },
|
|
||||||
-- {
|
|
||||||
-- icon="",
|
|
||||||
-- icon_hl = "@variable",
|
|
||||||
-- desc = "Apps",
|
|
||||||
-- group = "DiagnosticHint",
|
|
||||||
-- key = "a",
|
|
||||||
-- action = "Telescope app",
|
|
||||||
-- },
|
|
||||||
-- {
|
|
||||||
-- desc = " dotfiles",
|
|
||||||
-- group = "Number",
|
|
||||||
-- key = "d",
|
|
||||||
-- action = "Telescope dotfiles",
|
|
||||||
-- },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
hide = {
|
|
||||||
statusline = true, -- hide statusline default is true
|
|
||||||
tabline = false, -- hide the tabline
|
|
||||||
winbar = true, -- hide winbar
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,106 +0,0 @@
|
|||||||
return {
|
|
||||||
{
|
|
||||||
"windwp/nvim-autopairs",
|
|
||||||
event = "VeryLazy",
|
|
||||||
config = function(_, opts)
|
|
||||||
require("nvim-autopairs").setup(opts)
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"numToStr/Comment.nvim",
|
|
||||||
event = "VeryLazy",
|
|
||||||
config = function(_, opts)
|
|
||||||
require("Comment").setup(opts)
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"folke/todo-comments.nvim",
|
|
||||||
event = "VeryLazy",
|
|
||||||
cmd = { "TodoTelescope", "TodoLocList" },
|
|
||||||
config = true,
|
|
||||||
-- stylua: ignore
|
|
||||||
keys = {
|
|
||||||
{ "]t", function() require("todo-comments").jump_next() end, desc = "Next todo comment" },
|
|
||||||
{ "[t", function() require("todo-comments").jump_prev() end, desc = "Previous todo comment" },
|
|
||||||
{ "<leader>tt", "<cmd>TodoTelescope<cr>", desc = "List Todo in Telescope" },
|
|
||||||
{ "<leader>tl", "<cmd>TodoLocList<cr>", desc = "List Todo in LocList" },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"nvimdev/dashboard-nvim",
|
|
||||||
init = function()
|
|
||||||
vim.cmd([[hi DashboardHeader guifg=#ee872d gui=bold]])
|
|
||||||
vim.cmd([[hi DashboardProjectTitle guifg=#d55fde gui=bold]])
|
|
||||||
vim.cmd([[hi DashboardProjectIcon guifg=#89ca78]])
|
|
||||||
vim.cmd([[hi DashboardMruTitle guifg=#d55fde gui=bold]])
|
|
||||||
vim.cmd([[hi DashboardShortCut guifg=#89ca78 gui=bold]])
|
|
||||||
end,
|
|
||||||
opts = {
|
|
||||||
theme = "hyper",
|
|
||||||
config = {
|
|
||||||
header = {
|
|
||||||
[[]],
|
|
||||||
[[¿¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿ ¿¿¿ ¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿]],
|
|
||||||
[[¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿]],
|
|
||||||
[[¿¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿ ¿¿¿ ¿¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿]],
|
|
||||||
[[¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿ ¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿]],
|
|
||||||
[[¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿ ¿¿¿¿¿¿ ¿¿¿ ¿¿¿]],
|
|
||||||
[[¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿ ¿¿¿¿¿ ¿¿¿¿¿¿ ¿¿¿]],
|
|
||||||
[[]],
|
|
||||||
},
|
|
||||||
shortcut = {
|
|
||||||
{
|
|
||||||
icon = "¿ ", --
|
|
||||||
desc = " Files",
|
|
||||||
group = "Label",
|
|
||||||
key = "f",
|
|
||||||
action = "Telescope find_files",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
desc = "¿ Find text",
|
|
||||||
group = "@property",
|
|
||||||
key = "g",
|
|
||||||
action = "Telescope live_grep ",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
desc = "¿ Quit",
|
|
||||||
group = "Number",
|
|
||||||
key = "q",
|
|
||||||
action = "qa",
|
|
||||||
},
|
|
||||||
-- {
|
|
||||||
-- desc = " Recent files",
|
|
||||||
-- group = "",
|
|
||||||
-- key = "r",
|
|
||||||
-- action = "Telescope oldfiles ",
|
|
||||||
-- },
|
|
||||||
-- {
|
|
||||||
-- desc = "󰊳 Update",
|
|
||||||
-- group = "@property",
|
|
||||||
-- key = "u",
|
|
||||||
-- action = "Lazy update",
|
|
||||||
-- },
|
|
||||||
-- {
|
|
||||||
-- icon="",
|
|
||||||
-- icon_hl = "@variable",
|
|
||||||
-- desc = "Apps",
|
|
||||||
-- group = "DiagnosticHint",
|
|
||||||
-- key = "a",
|
|
||||||
-- action = "Telescope app",
|
|
||||||
-- },
|
|
||||||
-- {
|
|
||||||
-- desc = " dotfiles",
|
|
||||||
-- group = "Number",
|
|
||||||
-- key = "d",
|
|
||||||
-- action = "Telescope dotfiles",
|
|
||||||
-- },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
hide = {
|
|
||||||
statusline = true, -- hide statusline default is true
|
|
||||||
tabline = false, -- hide the tabline
|
|
||||||
winbar = true, -- hide winbar
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,106 +0,0 @@
|
|||||||
return {
|
|
||||||
{
|
|
||||||
"windwp/nvim-autopairs",
|
|
||||||
event = "VeryLazy",
|
|
||||||
config = function(_, opts)
|
|
||||||
require("nvim-autopairs").setup(opts)
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"numToStr/Comment.nvim",
|
|
||||||
event = "VeryLazy",
|
|
||||||
config = function(_, opts)
|
|
||||||
require("Comment").setup(opts)
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"folke/todo-comments.nvim",
|
|
||||||
event = "VeryLazy",
|
|
||||||
cmd = { "TodoTelescope", "TodoLocList" },
|
|
||||||
config = true,
|
|
||||||
-- stylua: ignore
|
|
||||||
keys = {
|
|
||||||
{ "]t", function() require("todo-comments").jump_next() end, desc = "Next todo comment" },
|
|
||||||
{ "[t", function() require("todo-comments").jump_prev() end, desc = "Previous todo comment" },
|
|
||||||
{ "<leader>tt", "<cmd>TodoTelescope<cr>", desc = "List Todo in Telescope" },
|
|
||||||
{ "<leader>tl", "<cmd>TodoLocList<cr>", desc = "List Todo in LocList" },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"nvimdev/dashboard-nvim",
|
|
||||||
init = function()
|
|
||||||
vim.cmd([[hi DashboardHeader guifg=#ee872d gui=bold]])
|
|
||||||
vim.cmd([[hi DashboardProjectTitle guifg=#d55fde gui=bold]])
|
|
||||||
vim.cmd([[hi DashboardProjectIcon guifg=#89ca78]])
|
|
||||||
vim.cmd([[hi DashboardMruTitle guifg=#d55fde gui=bold]])
|
|
||||||
vim.cmd([[hi DashboardShortCut guifg=#89ca78 gui=bold]])
|
|
||||||
end,
|
|
||||||
opts = {
|
|
||||||
theme = "hyper",
|
|
||||||
config = {
|
|
||||||
header = {
|
|
||||||
[[]],
|
|
||||||
[[¿¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿ ¿¿¿ ¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿]],
|
|
||||||
[[¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿]],
|
|
||||||
[[¿¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿ ¿¿¿ ¿¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿]],
|
|
||||||
[[¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿ ¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿]],
|
|
||||||
[[¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿ ¿¿¿¿¿¿ ¿¿¿ ¿¿¿]],
|
|
||||||
[[¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿ ¿¿¿¿¿ ¿¿¿¿¿¿ ¿¿¿]],
|
|
||||||
[[]],
|
|
||||||
},
|
|
||||||
shortcut = {
|
|
||||||
{
|
|
||||||
icon = "¿ ", --
|
|
||||||
desc = " Files",
|
|
||||||
group = "Label",
|
|
||||||
key = "f",
|
|
||||||
action = "Telescope find_files",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
desc = "¿ Find text",
|
|
||||||
group = "@property",
|
|
||||||
key = "g",
|
|
||||||
action = "Telescope live_grep ",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
desc = "¿ Quit",
|
|
||||||
group = "Number",
|
|
||||||
key = "q",
|
|
||||||
action = "qa",
|
|
||||||
},
|
|
||||||
-- {
|
|
||||||
-- desc = " Recent files",
|
|
||||||
-- group = "",
|
|
||||||
-- key = "r",
|
|
||||||
-- action = "Telescope oldfiles ",
|
|
||||||
-- },
|
|
||||||
-- {
|
|
||||||
-- desc = "󰊳 Update",
|
|
||||||
-- group = "@property",
|
|
||||||
-- key = "u",
|
|
||||||
-- action = "Lazy update",
|
|
||||||
-- },
|
|
||||||
-- {
|
|
||||||
-- icon="",
|
|
||||||
-- icon_hl = "@variable",
|
|
||||||
-- desc = "Apps",
|
|
||||||
-- group = "DiagnosticHint",
|
|
||||||
-- key = "a",
|
|
||||||
-- action = "Telescope app",
|
|
||||||
-- },
|
|
||||||
-- {
|
|
||||||
-- desc = " dotfiles",
|
|
||||||
-- group = "Number",
|
|
||||||
-- key = "d",
|
|
||||||
-- action = "Telescope dotfiles",
|
|
||||||
-- },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
hide = {
|
|
||||||
statusline = true, -- hide statusline default is true
|
|
||||||
tabline = false, -- hide the tabline
|
|
||||||
winbar = true, -- hide winbar
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,112 +0,0 @@
|
|||||||
return {
|
|
||||||
{
|
|
||||||
"windwp/nvim-autopairs",
|
|
||||||
event = "VeryLazy",
|
|
||||||
config = function(_, opts)
|
|
||||||
require("nvim-autopairs").setup(opts)
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"numToStr/Comment.nvim",
|
|
||||||
event = "VeryLazy",
|
|
||||||
config = function(_, opts)
|
|
||||||
require("Comment").setup(opts)
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"folke/todo-comments.nvim",
|
|
||||||
event = "VeryLazy",
|
|
||||||
cmd = { "TodoTelescope", "TodoLocList" },
|
|
||||||
config = true,
|
|
||||||
-- stylua: ignore
|
|
||||||
keys = {
|
|
||||||
{ "]t", function() require("todo-comments").jump_next() end, desc = "Next todo comment" },
|
|
||||||
{ "[t", function() require("todo-comments").jump_prev() end, desc = "Previous todo comment" },
|
|
||||||
{ "<leader>tt", "<cmd>TodoTelescope<cr>", desc = "List Todo in Telescope" },
|
|
||||||
{ "<leader>tl", "<cmd>TodoLocList<cr>", desc = "List Todo in LocList" },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"nvimdev/dashboard-nvim",
|
|
||||||
init = function()
|
|
||||||
vim.cmd([[hi DashboardHeader guifg=#ee872d gui=bold]])
|
|
||||||
vim.cmd([[hi DashboardProjectTitle guifg=#d55fde gui=bold]])
|
|
||||||
vim.cmd([[hi DashboardProjectIcon guifg=#89ca78]])
|
|
||||||
vim.cmd([[hi DashboardMruTitle guifg=#d55fde gui=bold]])
|
|
||||||
vim.cmd([[hi DashboardShortCut guifg=#89ca78 gui=bold]])
|
|
||||||
end,
|
|
||||||
opts = {
|
|
||||||
theme = "hyper",
|
|
||||||
config = {
|
|
||||||
header = {
|
|
||||||
[[]],
|
|
||||||
[[¿¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿ ¿¿¿ ¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿]],
|
|
||||||
[[¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿]],
|
|
||||||
[[¿¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿ ¿¿¿ ¿¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿]],
|
|
||||||
[[¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿ ¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿]],
|
|
||||||
[[¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿ ¿¿¿¿¿¿ ¿¿¿ ¿¿¿]],
|
|
||||||
[[¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿ ¿¿¿¿¿ ¿¿¿¿¿¿ ¿¿¿]],
|
|
||||||
[[]],
|
|
||||||
},
|
|
||||||
shortcut = {
|
|
||||||
{
|
|
||||||
icon = "¿ ", --
|
|
||||||
desc = " Files",
|
|
||||||
group = "Label",
|
|
||||||
key = "f",
|
|
||||||
action = "Telescope find_files",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
desc = "¿ Find text",
|
|
||||||
group = "@property",
|
|
||||||
key = "g",
|
|
||||||
action = "Telescope live_grep ",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
desc = "¿ Config",
|
|
||||||
group = "DiagnosticHint",
|
|
||||||
key = "c",
|
|
||||||
action = "e $MYVIMRC ",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
desc = "¿ Quit",
|
|
||||||
group = "Number",
|
|
||||||
key = "q",
|
|
||||||
action = "qa",
|
|
||||||
},
|
|
||||||
-- {
|
|
||||||
-- desc = " Recent files",
|
|
||||||
-- group = "",
|
|
||||||
-- key = "r",
|
|
||||||
-- action = "Telescope oldfiles ",
|
|
||||||
-- },
|
|
||||||
-- {
|
|
||||||
-- desc = "󰊳 Update",
|
|
||||||
-- group = "@property",
|
|
||||||
-- key = "u",
|
|
||||||
-- action = "Lazy update",
|
|
||||||
-- },
|
|
||||||
-- {
|
|
||||||
-- icon="",
|
|
||||||
-- icon_hl = "@variable",
|
|
||||||
-- desc = "Apps",
|
|
||||||
-- group = "DiagnosticHint",
|
|
||||||
-- key = "a",
|
|
||||||
-- action = "Telescope app",
|
|
||||||
-- },
|
|
||||||
-- {
|
|
||||||
-- desc = " dotfiles",
|
|
||||||
-- group = "Number",
|
|
||||||
-- key = "d",
|
|
||||||
-- action = "Telescope dotfiles",
|
|
||||||
-- },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
hide = {
|
|
||||||
statusline = true, -- hide statusline default is true
|
|
||||||
tabline = false, -- hide the tabline
|
|
||||||
winbar = true, -- hide winbar
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,112 +0,0 @@
|
|||||||
return {
|
|
||||||
{
|
|
||||||
"windwp/nvim-autopairs",
|
|
||||||
event = "VeryLazy",
|
|
||||||
config = function(_, opts)
|
|
||||||
require("nvim-autopairs").setup(opts)
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"numToStr/Comment.nvim",
|
|
||||||
event = "VeryLazy",
|
|
||||||
config = function(_, opts)
|
|
||||||
require("Comment").setup(opts)
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"folke/todo-comments.nvim",
|
|
||||||
event = "VeryLazy",
|
|
||||||
cmd = { "TodoTelescope", "TodoLocList" },
|
|
||||||
config = true,
|
|
||||||
-- stylua: ignore
|
|
||||||
keys = {
|
|
||||||
{ "]t", function() require("todo-comments").jump_next() end, desc = "Next todo comment" },
|
|
||||||
{ "[t", function() require("todo-comments").jump_prev() end, desc = "Previous todo comment" },
|
|
||||||
{ "<leader>tt", "<cmd>TodoTelescope<cr>", desc = "List Todo in Telescope" },
|
|
||||||
{ "<leader>tl", "<cmd>TodoLocList<cr>", desc = "List Todo in LocList" },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"nvimdev/dashboard-nvim",
|
|
||||||
init = function()
|
|
||||||
vim.cmd([[hi DashboardHeader guifg=#ee872d gui=bold]])
|
|
||||||
vim.cmd([[hi DashboardProjectTitle guifg=#d55fde gui=bold]])
|
|
||||||
vim.cmd([[hi DashboardProjectIcon guifg=#89ca78]])
|
|
||||||
vim.cmd([[hi DashboardMruTitle guifg=#d55fde gui=bold]])
|
|
||||||
vim.cmd([[hi DashboardShortCut guifg=#89ca78 gui=bold]])
|
|
||||||
end,
|
|
||||||
opts = {
|
|
||||||
theme = "hyper",
|
|
||||||
config = {
|
|
||||||
header = {
|
|
||||||
[[]],
|
|
||||||
[[¿¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿ ¿¿¿ ¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿]],
|
|
||||||
[[¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿]],
|
|
||||||
[[¿¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿ ¿¿¿ ¿¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿]],
|
|
||||||
[[¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿ ¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿]],
|
|
||||||
[[¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿ ¿¿¿¿¿¿ ¿¿¿ ¿¿¿]],
|
|
||||||
[[¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿ ¿¿¿¿¿ ¿¿¿¿¿¿ ¿¿¿]],
|
|
||||||
[[]],
|
|
||||||
},
|
|
||||||
shortcut = {
|
|
||||||
{
|
|
||||||
icon = "¿ ", --
|
|
||||||
desc = " Files",
|
|
||||||
group = "Label",
|
|
||||||
key = "f",
|
|
||||||
action = "Telescope find_files",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
desc = "¿ Find text",
|
|
||||||
group = "@property",
|
|
||||||
key = "g",
|
|
||||||
action = "Telescope live_grep ",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
desc = "¿ Config",
|
|
||||||
group = "DiagnosticHint",
|
|
||||||
key = "c",
|
|
||||||
action = "e $MYVIMRC ",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
desc = "¿ Quit",
|
|
||||||
group = "Number",
|
|
||||||
key = "q",
|
|
||||||
action = "qa",
|
|
||||||
},
|
|
||||||
-- {
|
|
||||||
-- desc = " Recent files",
|
|
||||||
-- group = "",
|
|
||||||
-- key = "r",
|
|
||||||
-- action = "Telescope oldfiles ",
|
|
||||||
-- },
|
|
||||||
-- {
|
|
||||||
-- desc = "󰊳 Update",
|
|
||||||
-- group = "@property",
|
|
||||||
-- key = "u",
|
|
||||||
-- action = "Lazy update",
|
|
||||||
-- },
|
|
||||||
-- {
|
|
||||||
-- icon="",
|
|
||||||
-- icon_hl = "@variable",
|
|
||||||
-- desc = "Apps",
|
|
||||||
-- group = "DiagnosticHint",
|
|
||||||
-- key = "a",
|
|
||||||
-- action = "Telescope app",
|
|
||||||
-- },
|
|
||||||
-- {
|
|
||||||
-- desc = " dotfiles",
|
|
||||||
-- group = "Number",
|
|
||||||
-- key = "d",
|
|
||||||
-- action = "Telescope dotfiles",
|
|
||||||
-- },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
hide = {
|
|
||||||
statusline = true, -- hide statusline default is true
|
|
||||||
tabline = false, -- hide the tabline
|
|
||||||
winbar = true, -- hide winbar
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,112 +0,0 @@
|
|||||||
return {
|
|
||||||
{
|
|
||||||
"windwp/nvim-autopairs",
|
|
||||||
event = "VeryLazy",
|
|
||||||
config = function(_, opts)
|
|
||||||
require("nvim-autopairs").setup(opts)
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"numToStr/Comment.nvim",
|
|
||||||
event = "VeryLazy",
|
|
||||||
config = function(_, opts)
|
|
||||||
require("Comment").setup(opts)
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"folke/todo-comments.nvim",
|
|
||||||
event = "VeryLazy",
|
|
||||||
cmd = { "TodoTelescope", "TodoLocList" },
|
|
||||||
config = true,
|
|
||||||
-- stylua: ignore
|
|
||||||
keys = {
|
|
||||||
{ "]t", function() require("todo-comments").jump_next() end, desc = "Next todo comment" },
|
|
||||||
{ "[t", function() require("todo-comments").jump_prev() end, desc = "Previous todo comment" },
|
|
||||||
{ "<leader>tt", "<cmd>TodoTelescope<cr>", desc = "List Todo in Telescope" },
|
|
||||||
{ "<leader>tl", "<cmd>TodoLocList<cr>", desc = "List Todo in LocList" },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"nvimdev/dashboard-nvim",
|
|
||||||
init = function()
|
|
||||||
vim.cmd([[hi DashboardHeader guifg=#ee872d gui=bold]])
|
|
||||||
vim.cmd([[hi DashboardProjectTitle guifg=#d55fde gui=bold]])
|
|
||||||
vim.cmd([[hi DashboardProjectIcon guifg=#89ca78]])
|
|
||||||
vim.cmd([[hi DashboardMruTitle guifg=#d55fde gui=bold]])
|
|
||||||
vim.cmd([[hi DashboardShortCut guifg=#89ca78 gui=bold]])
|
|
||||||
end,
|
|
||||||
opts = {
|
|
||||||
theme = "hyper",
|
|
||||||
config = {
|
|
||||||
header = {
|
|
||||||
[[]],
|
|
||||||
[[¿¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿ ¿¿¿ ¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿]],
|
|
||||||
[[¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿]],
|
|
||||||
[[¿¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿ ¿¿¿ ¿¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿]],
|
|
||||||
[[¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿ ¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿]],
|
|
||||||
[[¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿ ¿¿¿¿¿¿ ¿¿¿ ¿¿¿]],
|
|
||||||
[[¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿ ¿¿¿¿¿ ¿¿¿¿¿¿ ¿¿¿]],
|
|
||||||
[[]],
|
|
||||||
},
|
|
||||||
shortcut = {
|
|
||||||
{
|
|
||||||
icon = "¿ ", --
|
|
||||||
desc = " Files",
|
|
||||||
group = "Label",
|
|
||||||
key = "f",
|
|
||||||
action = "Telescope find_files",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
desc = "¿ Find text",
|
|
||||||
group = "@property",
|
|
||||||
key = "g",
|
|
||||||
action = "Telescope live_grep ",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
desc = "¿ Config",
|
|
||||||
group = "DiagnosticHint",
|
|
||||||
key = "c",
|
|
||||||
action = "e $MYVIMRC ",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
desc = "¿ Quit",
|
|
||||||
group = "Number",
|
|
||||||
key = "q",
|
|
||||||
action = "qa",
|
|
||||||
},
|
|
||||||
-- {
|
|
||||||
-- desc = " Recent files",
|
|
||||||
-- group = "",
|
|
||||||
-- key = "r",
|
|
||||||
-- action = "Telescope oldfiles ",
|
|
||||||
-- },
|
|
||||||
-- {
|
|
||||||
-- desc = "󰊳 Update",
|
|
||||||
-- group = "@property",
|
|
||||||
-- key = "u",
|
|
||||||
-- action = "Lazy update",
|
|
||||||
-- },
|
|
||||||
-- {
|
|
||||||
-- icon="",
|
|
||||||
-- icon_hl = "@variable",
|
|
||||||
-- desc = "Apps",
|
|
||||||
-- group = "DiagnosticHint",
|
|
||||||
-- key = "a",
|
|
||||||
-- action = "Telescope app",
|
|
||||||
-- },
|
|
||||||
-- {
|
|
||||||
-- desc = " dotfiles",
|
|
||||||
-- group = "Number",
|
|
||||||
-- key = "d",
|
|
||||||
-- action = "Telescope dotfiles",
|
|
||||||
-- },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
hide = {
|
|
||||||
statusline = true, -- hide statusline default is true
|
|
||||||
tabline = false, -- hide the tabline
|
|
||||||
winbar = true, -- hide winbar
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,112 +0,0 @@
|
|||||||
return {
|
|
||||||
{
|
|
||||||
"windwp/nvim-autopairs",
|
|
||||||
event = "VeryLazy",
|
|
||||||
config = function(_, opts)
|
|
||||||
require("nvim-autopairs").setup(opts)
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"numToStr/Comment.nvim",
|
|
||||||
event = "VeryLazy",
|
|
||||||
config = function(_, opts)
|
|
||||||
require("Comment").setup(opts)
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"folke/todo-comments.nvim",
|
|
||||||
event = "VeryLazy",
|
|
||||||
cmd = { "TodoTelescope", "TodoLocList" },
|
|
||||||
config = true,
|
|
||||||
-- stylua: ignore
|
|
||||||
keys = {
|
|
||||||
{ "]t", function() require("todo-comments").jump_next() end, desc = "Next todo comment" },
|
|
||||||
{ "[t", function() require("todo-comments").jump_prev() end, desc = "Previous todo comment" },
|
|
||||||
{ "<leader>tt", "<cmd>TodoTelescope<cr>", desc = "List Todo in Telescope" },
|
|
||||||
{ "<leader>tl", "<cmd>TodoLocList<cr>", desc = "List Todo in LocList" },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"nvimdev/dashboard-nvim",
|
|
||||||
init = function()
|
|
||||||
vim.cmd([[hi DashboardHeader guifg=#ee872d gui=bold]])
|
|
||||||
vim.cmd([[hi DashboardProjectTitle guifg=#d55fde gui=bold]])
|
|
||||||
vim.cmd([[hi DashboardProjectIcon guifg=#89ca78]])
|
|
||||||
vim.cmd([[hi DashboardMruTitle guifg=#d55fde gui=bold]])
|
|
||||||
vim.cmd([[hi DashboardShortCut guifg=#89ca78 gui=bold]])
|
|
||||||
end,
|
|
||||||
opts = {
|
|
||||||
theme = "hyper",
|
|
||||||
config = {
|
|
||||||
header = {
|
|
||||||
[[]],
|
|
||||||
[[¿¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿ ¿¿¿ ¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿]],
|
|
||||||
[[¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿]],
|
|
||||||
[[¿¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿ ¿¿¿ ¿¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿]],
|
|
||||||
[[¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿ ¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿]],
|
|
||||||
[[¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿ ¿¿¿¿¿¿ ¿¿¿ ¿¿¿]],
|
|
||||||
[[¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿ ¿¿¿¿¿ ¿¿¿¿¿¿ ¿¿¿]],
|
|
||||||
[[]],
|
|
||||||
},
|
|
||||||
shortcut = {
|
|
||||||
{
|
|
||||||
icon = "¿ ", --
|
|
||||||
desc = " Files",
|
|
||||||
group = "Label",
|
|
||||||
key = "f",
|
|
||||||
action = "Telescope find_files",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
desc = "¿ Find text",
|
|
||||||
group = "@property",
|
|
||||||
key = "g",
|
|
||||||
action = "Telescope live_grep ",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
desc = "¿ Config",
|
|
||||||
group = "DiagnosticHint",
|
|
||||||
key = "c",
|
|
||||||
action = "e $MYVIMRC ",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
desc = "¿ Quit",
|
|
||||||
group = "Number",
|
|
||||||
key = "q",
|
|
||||||
action = "qa",
|
|
||||||
},
|
|
||||||
-- {
|
|
||||||
-- desc = " Recent files",
|
|
||||||
-- group = "",
|
|
||||||
-- key = "r",
|
|
||||||
-- action = "Telescope oldfiles ",
|
|
||||||
-- },
|
|
||||||
-- {
|
|
||||||
-- desc = "󰊳 Update",
|
|
||||||
-- group = "@property",
|
|
||||||
-- key = "u",
|
|
||||||
-- action = "Lazy update",
|
|
||||||
-- },
|
|
||||||
-- {
|
|
||||||
-- icon="",
|
|
||||||
-- icon_hl = "@variable",
|
|
||||||
-- desc = "Apps",
|
|
||||||
-- group = "DiagnosticHint",
|
|
||||||
-- key = "a",
|
|
||||||
-- action = "Telescope app",
|
|
||||||
-- },
|
|
||||||
-- {
|
|
||||||
-- desc = " dotfiles",
|
|
||||||
-- group = "Number",
|
|
||||||
-- key = "d",
|
|
||||||
-- action = "Telescope dotfiles",
|
|
||||||
-- },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
hide = {
|
|
||||||
statusline = true, -- hide statusline default is true
|
|
||||||
tabline = false, -- hide the tabline
|
|
||||||
winbar = true, -- hide winbar
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,112 +0,0 @@
|
|||||||
return {
|
|
||||||
{
|
|
||||||
"windwp/nvim-autopairs",
|
|
||||||
event = "VeryLazy",
|
|
||||||
config = function(_, opts)
|
|
||||||
require("nvim-autopairs").setup(opts)
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"numToStr/Comment.nvim",
|
|
||||||
event = "VeryLazy",
|
|
||||||
config = function(_, opts)
|
|
||||||
require("Comment").setup(opts)
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"folke/todo-comments.nvim",
|
|
||||||
event = "VeryLazy",
|
|
||||||
cmd = { "TodoTelescope", "TodoLocList" },
|
|
||||||
config = true,
|
|
||||||
-- stylua: ignore
|
|
||||||
keys = {
|
|
||||||
{ "]t", function() require("todo-comments").jump_next() end, desc = "Next todo comment" },
|
|
||||||
{ "[t", function() require("todo-comments").jump_prev() end, desc = "Previous todo comment" },
|
|
||||||
{ "<leader>tt", "<cmd>TodoTelescope<cr>", desc = "List Todo in Telescope" },
|
|
||||||
{ "<leader>tl", "<cmd>TodoLocList<cr>", desc = "List Todo in LocList" },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"nvimdev/dashboard-nvim",
|
|
||||||
init = function()
|
|
||||||
vim.cmd([[hi DashboardHeader guifg=#ee872d gui=bold]])
|
|
||||||
vim.cmd([[hi DashboardProjectTitle guifg=#d55fde gui=bold]])
|
|
||||||
vim.cmd([[hi DashboardProjectIcon guifg=#89ca78]])
|
|
||||||
vim.cmd([[hi DashboardMruTitle guifg=#d55fde gui=bold]])
|
|
||||||
vim.cmd([[hi DashboardShortCut guifg=#89ca78 gui=bold]])
|
|
||||||
end,
|
|
||||||
opts = {
|
|
||||||
theme = "hyper",
|
|
||||||
config = {
|
|
||||||
header = {
|
|
||||||
[[]],
|
|
||||||
[[¿¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿ ¿¿¿ ¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿]],
|
|
||||||
[[¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿]],
|
|
||||||
[[¿¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿ ¿¿¿ ¿¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿]],
|
|
||||||
[[¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿ ¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿]],
|
|
||||||
[[¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿ ¿¿¿¿¿¿ ¿¿¿ ¿¿¿]],
|
|
||||||
[[¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿ ¿¿¿¿¿ ¿¿¿¿¿¿ ¿¿¿]],
|
|
||||||
[[]],
|
|
||||||
},
|
|
||||||
shortcut = {
|
|
||||||
{
|
|
||||||
icon = "¿ ", --
|
|
||||||
desc = " Files",
|
|
||||||
group = "Label",
|
|
||||||
key = "f",
|
|
||||||
action = "Telescope find_files",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
desc = "¿ Find text",
|
|
||||||
group = "@property",
|
|
||||||
key = "g",
|
|
||||||
action = "Telescope live_grep ",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
desc = "¿ Config",
|
|
||||||
group = "DiagnosticHint",
|
|
||||||
key = "c",
|
|
||||||
action = "e $MYVIMRC ",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
desc = "¿ Quit",
|
|
||||||
group = "Number",
|
|
||||||
key = "q",
|
|
||||||
action = "qa",
|
|
||||||
},
|
|
||||||
-- {
|
|
||||||
-- desc = " Recent files",
|
|
||||||
-- group = "",
|
|
||||||
-- key = "r",
|
|
||||||
-- action = "Telescope oldfiles ",
|
|
||||||
-- },
|
|
||||||
-- {
|
|
||||||
-- desc = "󰊳 Update",
|
|
||||||
-- group = "@property",
|
|
||||||
-- key = "u",
|
|
||||||
-- action = "Lazy update",
|
|
||||||
-- },
|
|
||||||
-- {
|
|
||||||
-- icon="",
|
|
||||||
-- icon_hl = "@variable",
|
|
||||||
-- desc = "Apps",
|
|
||||||
-- group = "DiagnosticHint",
|
|
||||||
-- key = "a",
|
|
||||||
-- action = "Telescope app",
|
|
||||||
-- },
|
|
||||||
-- {
|
|
||||||
-- desc = " dotfiles",
|
|
||||||
-- group = "Number",
|
|
||||||
-- key = "d",
|
|
||||||
-- action = "Telescope dotfiles",
|
|
||||||
-- },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
hide = {
|
|
||||||
statusline = true, -- hide statusline default is true
|
|
||||||
tabline = false, -- hide the tabline
|
|
||||||
winbar = true, -- hide winbar
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,112 +0,0 @@
|
|||||||
return {
|
|
||||||
{
|
|
||||||
"windwp/nvim-autopairs",
|
|
||||||
event = "VeryLazy",
|
|
||||||
config = function(_, opts)
|
|
||||||
require("nvim-autopairs").setup(opts)
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"numToStr/Comment.nvim",
|
|
||||||
event = "VeryLazy",
|
|
||||||
config = function(_, opts)
|
|
||||||
require("Comment").setup(opts)
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"folke/todo-comments.nvim",
|
|
||||||
event = "VeryLazy",
|
|
||||||
cmd = { "TodoTelescope", "TodoLocList" },
|
|
||||||
config = true,
|
|
||||||
-- stylua: ignore
|
|
||||||
keys = {
|
|
||||||
{ "]t", function() require("todo-comments").jump_next() end, desc = "Next todo comment" },
|
|
||||||
{ "[t", function() require("todo-comments").jump_prev() end, desc = "Previous todo comment" },
|
|
||||||
{ "<leader>tt", "<cmd>TodoTelescope<cr>", desc = "List Todo in Telescope" },
|
|
||||||
{ "<leader>tl", "<cmd>TodoLocList<cr>", desc = "List Todo in LocList" },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"nvimdev/dashboard-nvim",
|
|
||||||
init = function()
|
|
||||||
vim.cmd([[hi DashboardHeader guifg=#ee872d gui=bold]])
|
|
||||||
vim.cmd([[hi DashboardProjectTitle guifg=#d55fde gui=bold]])
|
|
||||||
vim.cmd([[hi DashboardProjectIcon guifg=#89ca78]])
|
|
||||||
vim.cmd([[hi DashboardMruTitle guifg=#d55fde gui=bold]])
|
|
||||||
vim.cmd([[hi DashboardShortCut guifg=#89ca78 gui=bold]])
|
|
||||||
end,
|
|
||||||
opts = {
|
|
||||||
theme = "hyper",
|
|
||||||
config = {
|
|
||||||
header = {
|
|
||||||
[[]],
|
|
||||||
[[¿¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿ ¿¿¿ ¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿]],
|
|
||||||
[[¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿]],
|
|
||||||
[[¿¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿ ¿¿¿ ¿¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿]],
|
|
||||||
[[¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿ ¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿]],
|
|
||||||
[[¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿ ¿¿¿¿¿¿ ¿¿¿ ¿¿¿]],
|
|
||||||
[[¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿ ¿¿¿¿¿ ¿¿¿¿¿¿ ¿¿¿]],
|
|
||||||
[[]],
|
|
||||||
},
|
|
||||||
shortcut = {
|
|
||||||
{
|
|
||||||
icon = "¿ ", --
|
|
||||||
desc = " Files",
|
|
||||||
group = "Label",
|
|
||||||
key = "f",
|
|
||||||
action = "Telescope find_files",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
desc = "¿ Find text",
|
|
||||||
group = "@property",
|
|
||||||
key = "g",
|
|
||||||
action = "Telescope live_grep ",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
desc = "¿ Config",
|
|
||||||
group = "DiagnosticHint",
|
|
||||||
key = "c",
|
|
||||||
action = "e $MYVIMRC ",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
desc = "¿ Quit",
|
|
||||||
group = "Number",
|
|
||||||
key = "q",
|
|
||||||
action = "qa",
|
|
||||||
},
|
|
||||||
-- {
|
|
||||||
-- desc = " Recent files",
|
|
||||||
-- group = "",
|
|
||||||
-- key = "r",
|
|
||||||
-- action = "Telescope oldfiles ",
|
|
||||||
-- },
|
|
||||||
-- {
|
|
||||||
-- desc = "󰊳 Update",
|
|
||||||
-- group = "@property",
|
|
||||||
-- key = "u",
|
|
||||||
-- action = "Lazy update",
|
|
||||||
-- },
|
|
||||||
-- {
|
|
||||||
-- icon="",
|
|
||||||
-- icon_hl = "@variable",
|
|
||||||
-- desc = "Apps",
|
|
||||||
-- group = "DiagnosticHint",
|
|
||||||
-- key = "a",
|
|
||||||
-- action = "Telescope app",
|
|
||||||
-- },
|
|
||||||
-- {
|
|
||||||
-- desc = " dotfiles",
|
|
||||||
-- group = "Number",
|
|
||||||
-- key = "d",
|
|
||||||
-- action = "Telescope dotfiles",
|
|
||||||
-- },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
hide = {
|
|
||||||
statusline = true, -- hide statusline default is true
|
|
||||||
tabline = false, -- hide the tabline
|
|
||||||
winbar = true, -- hide winbar
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,112 +0,0 @@
|
|||||||
return {
|
|
||||||
{
|
|
||||||
"windwp/nvim-autopairs",
|
|
||||||
event = "VeryLazy",
|
|
||||||
config = function(_, opts)
|
|
||||||
require("nvim-autopairs").setup(opts)
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"numToStr/Comment.nvim",
|
|
||||||
event = "VeryLazy",
|
|
||||||
config = function(_, opts)
|
|
||||||
require("Comment").setup(opts)
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"folke/todo-comments.nvim",
|
|
||||||
event = "VeryLazy",
|
|
||||||
cmd = { "TodoTelescope", "TodoLocList" },
|
|
||||||
config = true,
|
|
||||||
-- stylua: ignore
|
|
||||||
keys = {
|
|
||||||
{ "]t", function() require("todo-comments").jump_next() end, desc = "Next todo comment" },
|
|
||||||
{ "[t", function() require("todo-comments").jump_prev() end, desc = "Previous todo comment" },
|
|
||||||
{ "<leader>tt", "<cmd>TodoTelescope<cr>", desc = "List Todo in Telescope" },
|
|
||||||
{ "<leader>tl", "<cmd>TodoLocList<cr>", desc = "List Todo in LocList" },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"nvimdev/dashboard-nvim",
|
|
||||||
init = function()
|
|
||||||
vim.cmd([[hi DashboardHeader guifg=#ee872d gui=bold]])
|
|
||||||
vim.cmd([[hi DashboardProjectTitle guifg=#d55fde gui=bold]])
|
|
||||||
vim.cmd([[hi DashboardProjectIcon guifg=#89ca78]])
|
|
||||||
vim.cmd([[hi DashboardMruTitle guifg=#d55fde gui=bold]])
|
|
||||||
vim.cmd([[hi DashboardShortCut guifg=#89ca78 gui=bold]])
|
|
||||||
end,
|
|
||||||
opts = {
|
|
||||||
theme = "hyper",
|
|
||||||
config = {
|
|
||||||
header = {
|
|
||||||
[[]],
|
|
||||||
[[¿¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿ ¿¿¿ ¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿]],
|
|
||||||
[[¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿]],
|
|
||||||
[[¿¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿ ¿¿¿ ¿¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿]],
|
|
||||||
[[¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿ ¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿]],
|
|
||||||
[[¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿ ¿¿¿¿¿¿ ¿¿¿ ¿¿¿]],
|
|
||||||
[[¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿ ¿¿¿¿¿ ¿¿¿¿¿¿ ¿¿¿]],
|
|
||||||
[[]],
|
|
||||||
},
|
|
||||||
shortcut = {
|
|
||||||
{
|
|
||||||
icon = "¿ ", --
|
|
||||||
desc = " Files",
|
|
||||||
group = "Label",
|
|
||||||
key = "f",
|
|
||||||
action = "Telescope find_files",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
desc = "¿ Find text",
|
|
||||||
group = "@property",
|
|
||||||
key = "g",
|
|
||||||
action = "Telescope live_grep ",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
desc = "¿ Config",
|
|
||||||
group = "DiagnosticHint",
|
|
||||||
key = "c",
|
|
||||||
action = "e $MYVIMRC ",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
desc = "¿ Quit",
|
|
||||||
group = "Number",
|
|
||||||
key = "q",
|
|
||||||
action = "qa",
|
|
||||||
},
|
|
||||||
-- {
|
|
||||||
-- desc = " Recent files",
|
|
||||||
-- group = "",
|
|
||||||
-- key = "r",
|
|
||||||
-- action = "Telescope oldfiles ",
|
|
||||||
-- },
|
|
||||||
-- {
|
|
||||||
-- desc = "󰊳 Update",
|
|
||||||
-- group = "@property",
|
|
||||||
-- key = "u",
|
|
||||||
-- action = "Lazy update",
|
|
||||||
-- },
|
|
||||||
-- {
|
|
||||||
-- icon="",
|
|
||||||
-- icon_hl = "@variable",
|
|
||||||
-- desc = "Apps",
|
|
||||||
-- group = "DiagnosticHint",
|
|
||||||
-- key = "a",
|
|
||||||
-- action = "Telescope app",
|
|
||||||
-- },
|
|
||||||
-- {
|
|
||||||
-- desc = " dotfiles",
|
|
||||||
-- group = "Number",
|
|
||||||
-- key = "d",
|
|
||||||
-- action = "Telescope dotfiles",
|
|
||||||
-- },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
hide = {
|
|
||||||
statusline = true, -- hide statusline default is true
|
|
||||||
tabline = false, -- hide the tabline
|
|
||||||
winbar = true, -- hide winbar
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,112 +0,0 @@
|
|||||||
return {
|
|
||||||
{
|
|
||||||
"windwp/nvim-autopairs",
|
|
||||||
event = "VeryLazy",
|
|
||||||
config = function(_, opts)
|
|
||||||
require("nvim-autopairs").setup(opts)
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"numToStr/Comment.nvim",
|
|
||||||
event = "VeryLazy",
|
|
||||||
config = function(_, opts)
|
|
||||||
require("Comment").setup(opts)
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"folke/todo-comments.nvim",
|
|
||||||
event = "VeryLazy",
|
|
||||||
cmd = { "TodoTelescope", "TodoLocList" },
|
|
||||||
config = true,
|
|
||||||
-- stylua: ignore
|
|
||||||
keys = {
|
|
||||||
{ "]t", function() require("todo-comments").jump_next() end, desc = "Next todo comment" },
|
|
||||||
{ "[t", function() require("todo-comments").jump_prev() end, desc = "Previous todo comment" },
|
|
||||||
{ "<leader>tt", "<cmd>TodoTelescope<cr>", desc = "List Todo in Telescope" },
|
|
||||||
{ "<leader>tl", "<cmd>TodoLocList<cr>", desc = "List Todo in LocList" },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"nvimdev/dashboard-nvim",
|
|
||||||
init = function()
|
|
||||||
vim.cmd([[hi DashboardHeader guifg=#ee872d gui=bold]])
|
|
||||||
vim.cmd([[hi DashboardProjectTitle guifg=#d55fde gui=bold]])
|
|
||||||
vim.cmd([[hi DashboardProjectIcon guifg=#89ca78]])
|
|
||||||
vim.cmd([[hi DashboardMruTitle guifg=#d55fde gui=bold]])
|
|
||||||
vim.cmd([[hi DashboardShortCut guifg=#89ca78 gui=bold]])
|
|
||||||
end,
|
|
||||||
opts = {
|
|
||||||
theme = "hyper",
|
|
||||||
config = {
|
|
||||||
header = {
|
|
||||||
[[]],
|
|
||||||
[[¿¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿ ¿¿¿ ¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿]],
|
|
||||||
[[¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿]],
|
|
||||||
[[¿¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿ ¿¿¿ ¿¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿]],
|
|
||||||
[[¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿ ¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿]],
|
|
||||||
[[¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿ ¿¿¿¿¿¿ ¿¿¿ ¿¿¿]],
|
|
||||||
[[¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿ ¿¿¿¿¿ ¿¿¿¿¿¿ ¿¿¿]],
|
|
||||||
[[]],
|
|
||||||
},
|
|
||||||
shortcut = {
|
|
||||||
{
|
|
||||||
icon = " ", --
|
|
||||||
desc = " Files",
|
|
||||||
group = "Label",
|
|
||||||
key = "f",
|
|
||||||
action = "Telescope find_files",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
desc = " Find text",
|
|
||||||
group = "@property",
|
|
||||||
key = "g",
|
|
||||||
action = "Telescope live_grep ",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
desc = "� Config",
|
|
||||||
group = "DiagnosticHint",
|
|
||||||
key = "c",
|
|
||||||
action = "e $MYVIMRC ",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
desc = "� Quit",
|
|
||||||
group = "Number",
|
|
||||||
key = "q",
|
|
||||||
action = "qa",
|
|
||||||
},
|
|
||||||
-- {
|
|
||||||
-- desc = " Recent files",
|
|
||||||
-- group = "",
|
|
||||||
-- key = "r",
|
|
||||||
-- action = "Telescope oldfiles ",
|
|
||||||
-- },
|
|
||||||
-- {
|
|
||||||
-- desc = "󰊳 Update",
|
|
||||||
-- group = "@property",
|
|
||||||
-- key = "u",
|
|
||||||
-- action = "Lazy update",
|
|
||||||
-- },
|
|
||||||
-- {
|
|
||||||
-- icon="",
|
|
||||||
-- icon_hl = "@variable",
|
|
||||||
-- desc = "Apps",
|
|
||||||
-- group = "DiagnosticHint",
|
|
||||||
-- key = "a",
|
|
||||||
-- action = "Telescope app",
|
|
||||||
-- },
|
|
||||||
-- {
|
|
||||||
-- desc = " dotfiles",
|
|
||||||
-- group = "Number",
|
|
||||||
-- key = "d",
|
|
||||||
-- action = "Telescope dotfiles",
|
|
||||||
-- },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
hide = {
|
|
||||||
statusline = true, -- hide statusline default is true
|
|
||||||
tabline = false, -- hide the tabline
|
|
||||||
winbar = true, -- hide winbar
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,118 +0,0 @@
|
|||||||
return {
|
|
||||||
{
|
|
||||||
"windwp/nvim-autopairs",
|
|
||||||
event = "VeryLazy",
|
|
||||||
config = function(_, opts)
|
|
||||||
require("nvim-autopairs").setup(opts)
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"numToStr/Comment.nvim",
|
|
||||||
event = "VeryLazy",
|
|
||||||
config = function(_, opts)
|
|
||||||
require("Comment").setup(opts)
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"folke/todo-comments.nvim",
|
|
||||||
event = "VeryLazy",
|
|
||||||
cmd = { "TodoTelescope", "TodoLocList" },
|
|
||||||
config = true,
|
|
||||||
-- stylua: ignore
|
|
||||||
keys = {
|
|
||||||
{ "]t", function() require("todo-comments").jump_next() end, desc = "Next todo comment" },
|
|
||||||
{ "[t", function() require("todo-comments").jump_prev() end, desc = "Previous todo comment" },
|
|
||||||
{ "<leader>tt", "<cmd>TodoTelescope<cr>", desc = "List Todo in Telescope" },
|
|
||||||
{ "<leader>tl", "<cmd>TodoLocList<cr>", desc = "List Todo in LocList" },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"nvimdev/dashboard-nvim",
|
|
||||||
init = function()
|
|
||||||
vim.cmd([[hi DashboardHeader guifg=#ee872d gui=bold]])
|
|
||||||
vim.cmd([[hi DashboardProjectTitle guifg=#d55fde gui=bold]])
|
|
||||||
vim.cmd([[hi DashboardProjectIcon guifg=#89ca78]])
|
|
||||||
vim.cmd([[hi DashboardMruTitle guifg=#d55fde gui=bold]])
|
|
||||||
vim.cmd([[hi DashboardShortCut guifg=#89ca78 gui=bold]])
|
|
||||||
end,
|
|
||||||
opts = {
|
|
||||||
theme = "hyper",
|
|
||||||
config = {
|
|
||||||
header = {
|
|
||||||
[[]],
|
|
||||||
[[¿¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿ ¿¿¿ ¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿]],
|
|
||||||
[[¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿]],
|
|
||||||
[[¿¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿ ¿¿¿ ¿¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿]],
|
|
||||||
[[¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿ ¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿]],
|
|
||||||
[[¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿ ¿¿¿¿¿¿ ¿¿¿ ¿¿¿]],
|
|
||||||
[[¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿ ¿¿¿¿¿ ¿¿¿¿¿¿ ¿¿¿]],
|
|
||||||
[[]],
|
|
||||||
},
|
|
||||||
shortcut = {
|
|
||||||
{
|
|
||||||
icon = " ", --
|
|
||||||
desc = " Files",
|
|
||||||
group = "Label",
|
|
||||||
key = "f",
|
|
||||||
action = "Telescope find_files",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
desc = " Find text",
|
|
||||||
group = "@property",
|
|
||||||
key = "g",
|
|
||||||
action = "Telescope live_grep ",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
desc = "ï…› New file",
|
|
||||||
group = "Macro",
|
|
||||||
key = "n",
|
|
||||||
action = "NvimTreeToggle",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
desc = "� Config",
|
|
||||||
group = "DiagnosticHint",
|
|
||||||
key = "c",
|
|
||||||
action = "e $MYVIMRC ",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
desc = "� Quit",
|
|
||||||
group = "Number",
|
|
||||||
key = "q",
|
|
||||||
action = "qa",
|
|
||||||
},
|
|
||||||
-- {
|
|
||||||
-- desc = " Recent files",
|
|
||||||
-- group = "",
|
|
||||||
-- key = "r",
|
|
||||||
-- action = "Telescope oldfiles ",
|
|
||||||
-- },
|
|
||||||
-- {
|
|
||||||
-- desc = "󰊳 Update",
|
|
||||||
-- group = "@property",
|
|
||||||
-- key = "u",
|
|
||||||
-- action = "Lazy update",
|
|
||||||
-- },
|
|
||||||
-- {
|
|
||||||
-- icon="",
|
|
||||||
-- icon_hl = "@variable",
|
|
||||||
-- desc = "Apps",
|
|
||||||
-- group = "DiagnosticHint",
|
|
||||||
-- key = "a",
|
|
||||||
-- action = "Telescope app",
|
|
||||||
-- },
|
|
||||||
-- {
|
|
||||||
-- desc = " dotfiles",
|
|
||||||
-- group = "Number",
|
|
||||||
-- key = "d",
|
|
||||||
-- action = "Telescope dotfiles",
|
|
||||||
-- },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
hide = {
|
|
||||||
statusline = true, -- hide statusline default is true
|
|
||||||
tabline = false, -- hide the tabline
|
|
||||||
winbar = true, -- hide winbar
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
+34
-10
@@ -1,12 +1,36 @@
|
|||||||
return {
|
return {
|
||||||
'stevearc/conform.nvim',
|
"stevearc/conform.nvim",
|
||||||
opts = {
|
opts = {
|
||||||
formatters_by_ft = {
|
formatters_by_ft = {
|
||||||
cpp = { "clang-format", lsp_format = "fallback"}
|
cpp = { "clang-format", lsp_format = "never" },
|
||||||
},
|
lua = { "stylua", prettier = "fallback" },
|
||||||
format_on_save = {
|
cmake = { "cmake_format", lsp_format = "fallback" },
|
||||||
timeout_ms = 500,
|
["*"] = { "codespell" },
|
||||||
lsp_format = "fallback",
|
},
|
||||||
},
|
formatters = {
|
||||||
},
|
-- Apply to ALL formatters that use temp files
|
||||||
|
["*"] = {
|
||||||
|
tmpfile_format = "/tmp/.conform.$RANDOM.$FILENAME",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
format_on_save = {
|
||||||
|
timeout_ms = 500,
|
||||||
|
lsp_format = "fallback",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
config = function(opts)
|
||||||
|
local conform = require("conform")
|
||||||
|
|
||||||
|
conform.setup(opts)
|
||||||
|
local util = require("conform.util")
|
||||||
|
local original_tmpfile = util.tmpfile_name
|
||||||
|
util.tmpfile_name = function(ctx, formatter)
|
||||||
|
return string.format(
|
||||||
|
"/tmp/.conform.%s.%s",
|
||||||
|
math.random(1000000, 9999999),
|
||||||
|
vim.fn.fnamemodify(ctx.filename, ":t")
|
||||||
|
)
|
||||||
|
end
|
||||||
|
end,
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,51 @@
|
|||||||
|
return {
|
||||||
|
"NeogitOrg/neogit",
|
||||||
|
lazy = true,
|
||||||
|
dependencies = {
|
||||||
|
"nvim-lua/plenary.nvim", -- required
|
||||||
|
"sindrets/diffview.nvim", -- optional
|
||||||
|
"m00qek/baleia.nvim", -- optional
|
||||||
|
"nvim-telescope/telescope.nvim", -- optional
|
||||||
|
"ibhagwan/fzf-lua", -- optional
|
||||||
|
},
|
||||||
|
cmd = "Neogit",
|
||||||
|
opts = {
|
||||||
|
git_services = {
|
||||||
|
["github.com"] = {
|
||||||
|
pull_request = "https://github.com/${owner}/${repository}/compare/${branch_name}?expand=1",
|
||||||
|
commit = "https://github.com/${owner}/${repository}/commit/${oid}",
|
||||||
|
tree = "https://${host}/${owner}/${repository}/tree/${branch_name}",
|
||||||
|
},
|
||||||
|
["bitbucket.org"] = {
|
||||||
|
pull_request = "https://bitbucket.org/${owner}/${repository}/pull-requests/new?source=${branch_name}&t=1",
|
||||||
|
commit = "https://bitbucket.org/${owner}/${repository}/commits/${oid}",
|
||||||
|
tree = "https://bitbucket.org/${owner}/${repository}/branch/${branch_name}",
|
||||||
|
},
|
||||||
|
["gitlab.com"] = {
|
||||||
|
pull_request = "https://gitlab.com/${owner}/${repository}/merge_requests/new?merge_request[source_branch]=${branch_name}",
|
||||||
|
commit = "https://gitlab.com/${owner}/${repository}/-/commit/${oid}",
|
||||||
|
tree = "https://gitlab.com/${owner}/${repository}/-/tree/${branch_name}?ref_type=heads",
|
||||||
|
},
|
||||||
|
["azure.com"] = {
|
||||||
|
pull_request = "https://dev.azure.com/${owner}/_git/${repository}/pullrequestcreate?sourceRef=${branch_name}&targetRef=${target}",
|
||||||
|
commit = "",
|
||||||
|
tree = "",
|
||||||
|
},
|
||||||
|
["codeberg.org"] = {
|
||||||
|
pull_request = "https://${host}/${owner}/${repository}/compare/${branch_name}",
|
||||||
|
commit = "https://${host}/${owner}/${repository}/commit/${oid}",
|
||||||
|
tree = "https://${host}/${owner}/${repository}/src/branch/${branch_name}",
|
||||||
|
},
|
||||||
|
["git.protei.ru"] = {
|
||||||
|
pull_request = "https://git.protei.ru/${owner}/${repository}/merge_requests/new?merge_request[source_branch]=${branch_name}",
|
||||||
|
commit = "https://git.protei.ru/${owner}/${repository}/-/commit/${oid}",
|
||||||
|
tree = "https://git.protei.ru/${owner}/${repository}/-/tree/${branch_name}?ref_type=heads",
|
||||||
|
},
|
||||||
|
["git.faumaray.ru"] = {
|
||||||
|
pull_request = "https://git.faumaray.ru/${owner}/${repository}/merge_requests/new?merge_request[source_branch]=${branch_name}",
|
||||||
|
commit = "https://git.faumaray.ru/${owner}/${repository}/-/commit/${oid}",
|
||||||
|
tree = "https://git.faumaray.ru/${owner}/${repository}/-/tree/${branch_name}?ref_type=heads",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
+167
-79
@@ -1,82 +1,170 @@
|
|||||||
return {
|
return {
|
||||||
"rebelot/heirline.nvim",
|
"rebelot/heirline.nvim",
|
||||||
dependencies = { "Zeioth/heirline-components.nvim" },
|
dependencies = { "Zeioth/heirline-components.nvim" },
|
||||||
opts = function()
|
opts = function()
|
||||||
local lib = require "heirline-components.all"
|
local utils = require("heirline.utils")
|
||||||
return {
|
local function setup_colors()
|
||||||
opts = {
|
return {
|
||||||
disable_winbar_cb = function(args) -- We do this to avoid showing it on the greeter.
|
bright_bg = utils.get_highlight("Folded").bg,
|
||||||
local is_disabled = not require("heirline-components.buffer").is_valid(args.buf) or
|
bright_fg = utils.get_highlight("Folded").fg,
|
||||||
lib.condition.buffer_matches({
|
red = utils.get_highlight("DiagnosticError").fg,
|
||||||
buftype = { "terminal", "prompt", "nofile", "help", "quickfix" },
|
dark_red = utils.get_highlight("DiffDelete").bg,
|
||||||
filetype = { "NvimTree", "neo%-tree", "dashboard", "Outline", "aerial" },
|
green = utils.get_highlight("String").fg,
|
||||||
}, args.buf)
|
blue = utils.get_highlight("Function").fg,
|
||||||
return is_disabled
|
gray = utils.get_highlight("NonText").fg,
|
||||||
end,
|
orange = utils.get_highlight("Constant").fg,
|
||||||
},
|
purple = utils.get_highlight("Statement").fg,
|
||||||
tabline = { -- UI upper bar
|
cyan = utils.get_highlight("Special").fg,
|
||||||
-- lib.component.tabline_conditional_padding(),
|
diag_warn = utils.get_highlight("DiagnosticWarn").fg,
|
||||||
-- lib.component.tabline_buffers(),
|
diag_error = utils.get_highlight("DiagnosticError").fg,
|
||||||
-- lib.component.fill { hl = { bg = "tabline_bg" } },
|
diag_hint = utils.get_highlight("DiagnosticHint").fg,
|
||||||
-- lib.component.tabline_tabpages()
|
diag_info = utils.get_highlight("DiagnosticInfo").fg,
|
||||||
},
|
git_del = utils.get_highlight("diffDeleted").fg,
|
||||||
winbar = { -- UI breadcrumbs bar
|
git_add = utils.get_highlight("diffAdded").fg,
|
||||||
init = function(self) self.bufnr = vim.api.nvim_get_current_buf() end,
|
git_change = utils.get_highlight("diffChanged").fg,
|
||||||
fallthrough = false,
|
}
|
||||||
-- Winbar for terminal, neotree, and aerial.
|
end
|
||||||
{
|
|
||||||
condition = function() return not lib.condition.is_active() end,
|
|
||||||
{
|
|
||||||
lib.component.neotree(),
|
|
||||||
lib.component.compiler_play(),
|
|
||||||
lib.component.fill(),
|
|
||||||
lib.component.compiler_build_type(),
|
|
||||||
lib.component.compiler_redo(),
|
|
||||||
lib.component.aerial(),
|
|
||||||
},
|
|
||||||
},
|
|
||||||
-- Regular winbar
|
|
||||||
{
|
|
||||||
lib.component.neotree(),
|
|
||||||
lib.component.compiler_play(),
|
|
||||||
lib.component.fill(),
|
|
||||||
lib.component.breadcrumbs(),
|
|
||||||
lib.component.fill(),
|
|
||||||
lib.component.compiler_redo(),
|
|
||||||
lib.component.aerial(),
|
|
||||||
}
|
|
||||||
},
|
|
||||||
statuscolumn = { -- UI left column
|
|
||||||
init = function(self) self.bufnr = vim.api.nvim_get_current_buf() end,
|
|
||||||
lib.component.foldcolumn(),
|
|
||||||
lib.component.numbercolumn(),
|
|
||||||
lib.component.signcolumn(),
|
|
||||||
} or nil,
|
|
||||||
statusline = { -- UI statusbar
|
|
||||||
hl = { fg = "fg", bg = "bg" },
|
|
||||||
lib.component.mode(),
|
|
||||||
lib.component.git_branch(),
|
|
||||||
lib.component.file_info(),
|
|
||||||
lib.component.git_diff(),
|
|
||||||
lib.component.diagnostics(),
|
|
||||||
lib.component.fill(),
|
|
||||||
lib.component.cmd_info(),
|
|
||||||
lib.component.fill(),
|
|
||||||
lib.component.lsp(),
|
|
||||||
lib.component.compiler_state(),
|
|
||||||
lib.component.virtual_env(),
|
|
||||||
lib.component.nav(),
|
|
||||||
lib.component.mode { surround = { separator = "right" } },
|
|
||||||
},
|
|
||||||
}
|
|
||||||
end,
|
|
||||||
config = function(_, opts)
|
|
||||||
local heirline = require "heirline"
|
|
||||||
local heirline_components = require "heirline-components.all"
|
|
||||||
|
|
||||||
-- Setup
|
-- require("heirline").load_colors(setup_colors)
|
||||||
heirline_components.init.subscribe_to_events()
|
-- or pass it to config.opts.colors
|
||||||
heirline.load_colors(heirline_components.hl.get_colors())
|
|
||||||
heirline.setup(opts)
|
vim.api.nvim_create_augroup("Heirline", { clear = true })
|
||||||
end,
|
vim.api.nvim_create_autocmd("ColorScheme", {
|
||||||
|
callback = function()
|
||||||
|
utils.on_colorscheme(setup_colors)
|
||||||
|
end,
|
||||||
|
group = "Heirline",
|
||||||
|
})
|
||||||
|
local Spacer = { provider = " " }
|
||||||
|
local function rpad(child)
|
||||||
|
return {
|
||||||
|
condition = child.condition,
|
||||||
|
child,
|
||||||
|
Spacer,
|
||||||
|
}
|
||||||
|
end
|
||||||
|
local function OverseerTasksForStatus(status)
|
||||||
|
return {
|
||||||
|
condition = function(self)
|
||||||
|
return self.tasks[status]
|
||||||
|
end,
|
||||||
|
provider = function(self)
|
||||||
|
return string.format("%s%d", self.symbols[status], #self.tasks[status])
|
||||||
|
end,
|
||||||
|
hl = function(self)
|
||||||
|
return {
|
||||||
|
fg = utils.get_highlight(string.format("Overseer%s", status)).fg,
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
local Overseer = {
|
||||||
|
condition = function()
|
||||||
|
return package.loaded.overseer
|
||||||
|
end,
|
||||||
|
init = function(self)
|
||||||
|
local tasks = require("overseer.task_list").list_tasks({ unique = true, include_ephemeral = true })
|
||||||
|
local tasks_by_status = require("overseer.util").tbl_group_by(tasks, "status")
|
||||||
|
self.tasks = tasks_by_status
|
||||||
|
end,
|
||||||
|
static = {
|
||||||
|
symbols = {
|
||||||
|
["CANCELED"] = " ",
|
||||||
|
["FAILURE"] = " ",
|
||||||
|
["SUCCESS"] = " ",
|
||||||
|
["RUNNING"] = " ",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
rpad(OverseerTasksForStatus("CANCELED")),
|
||||||
|
rpad(OverseerTasksForStatus("RUNNING")),
|
||||||
|
rpad(OverseerTasksForStatus("SUCCESS")),
|
||||||
|
rpad(OverseerTasksForStatus("FAILURE")),
|
||||||
|
}
|
||||||
|
|
||||||
|
local lib = require("heirline-components.all")
|
||||||
|
return {
|
||||||
|
opts = {
|
||||||
|
disable_winbar_cb = function(args) -- We do this to avoid showing it on the greeter.
|
||||||
|
local is_disabled = not require("heirline-components.buffer").is_valid(args.buf)
|
||||||
|
or lib.condition.buffer_matches({
|
||||||
|
buftype = { "terminal", "prompt", "nofile", "help", "quickfix" },
|
||||||
|
filetype = { "NvimTree", "neo%-tree", "dashboard", "Outline", "aerial" },
|
||||||
|
}, args.buf)
|
||||||
|
return is_disabled
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
tabline = { -- UI upper bar
|
||||||
|
-- lib.component.tabline_conditional_padding(),
|
||||||
|
-- lib.component.tabline_buffers(),
|
||||||
|
-- lib.component.fill { hl = { bg = "tabline_bg" } },
|
||||||
|
-- lib.component.tabline_tabpages()
|
||||||
|
},
|
||||||
|
winbar = { -- UI breadcrumbs bar
|
||||||
|
init = function(self)
|
||||||
|
self.bufnr = vim.api.nvim_get_current_buf()
|
||||||
|
end,
|
||||||
|
fallthrough = false,
|
||||||
|
-- Winbar for terminal, neotree, and aerial.
|
||||||
|
{
|
||||||
|
condition = function()
|
||||||
|
return not lib.condition.is_active()
|
||||||
|
end,
|
||||||
|
{
|
||||||
|
lib.component.neotree(),
|
||||||
|
lib.component.compiler_play(),
|
||||||
|
lib.component.fill(),
|
||||||
|
lib.component.compiler_build_type(),
|
||||||
|
lib.component.compiler_redo(),
|
||||||
|
lib.component.aerial(),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
-- Regular winbar
|
||||||
|
{
|
||||||
|
lib.component.neotree(),
|
||||||
|
lib.component.compiler_play(),
|
||||||
|
lib.component.fill(),
|
||||||
|
lib.component.breadcrumbs(),
|
||||||
|
lib.component.fill(),
|
||||||
|
lib.component.compiler_redo(),
|
||||||
|
lib.component.aerial(),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
statuscolumn = { -- UI left column
|
||||||
|
init = function(self)
|
||||||
|
self.bufnr = vim.api.nvim_get_current_buf()
|
||||||
|
end,
|
||||||
|
lib.component.foldcolumn(),
|
||||||
|
lib.component.numbercolumn(),
|
||||||
|
lib.component.signcolumn(),
|
||||||
|
} or nil,
|
||||||
|
statusline = { -- UI statusbar
|
||||||
|
hl = { fg = "fg", bg = "bg" },
|
||||||
|
lib.component.mode(),
|
||||||
|
lib.component.git_branch(),
|
||||||
|
lib.component.file_info(),
|
||||||
|
lib.component.git_diff(),
|
||||||
|
lib.component.diagnostics(),
|
||||||
|
Overseer,
|
||||||
|
lib.component.fill(),
|
||||||
|
lib.component.cmd_info(),
|
||||||
|
lib.component.fill(),
|
||||||
|
lib.component.lsp(),
|
||||||
|
lib.component.compiler_state(),
|
||||||
|
lib.component.virtual_env(),
|
||||||
|
lib.component.nav(),
|
||||||
|
lib.component.mode({ surround = { separator = "right" } }),
|
||||||
|
},
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
config = function(_, opts)
|
||||||
|
local heirline = require("heirline")
|
||||||
|
local heirline_components = require("heirline-components.all")
|
||||||
|
|
||||||
|
-- Setup
|
||||||
|
heirline_components.init.subscribe_to_events()
|
||||||
|
heirline.load_colors(heirline_components.hl.get_colors())
|
||||||
|
heirline.setup(opts)
|
||||||
|
end,
|
||||||
}
|
}
|
||||||
@@ -3,22 +3,7 @@ return {
|
|||||||
{
|
{
|
||||||
"akioweh/lsp-document-highlight.nvim",
|
"akioweh/lsp-document-highlight.nvim",
|
||||||
lazy = false,
|
lazy = false,
|
||||||
keys = {
|
|
||||||
{
|
|
||||||
"[[",
|
|
||||||
function()
|
|
||||||
require("lsp-document-highlight").jump(-vim.v.count1, true)
|
|
||||||
end,
|
|
||||||
desc = "Previous Reference",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"]]",
|
|
||||||
function()
|
|
||||||
require("lsp-document-highlight").jump(vim.v.count1, true)
|
|
||||||
end,
|
|
||||||
desc = "Next Reference",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
---@type LDH.config
|
---@type LDH.config
|
||||||
opts = {
|
opts = {
|
||||||
throttle = 50,
|
throttle = 50,
|
||||||
|
|||||||
+71
-323
@@ -1,6 +1,6 @@
|
|||||||
return {
|
return {
|
||||||
'neovim/nvim-lspconfig',
|
'neovim/nvim-lspconfig',
|
||||||
dependencies = { 'saghen/blink.cmp', 'ibhagwan/fzf-lua', {
|
dependencies = { 'saghen/blink.cmp', 'ibhagwan/fzf-lua', {
|
||||||
"nvimdev/lspsaga.nvim",
|
"nvimdev/lspsaga.nvim",
|
||||||
event = "LspAttach",
|
event = "LspAttach",
|
||||||
opts = {
|
opts = {
|
||||||
@@ -13,331 +13,79 @@ return {
|
|||||||
},
|
},
|
||||||
}, },
|
}, },
|
||||||
|
|
||||||
-- example using `opts` for defining servers
|
-- example using `opts` for defining servers
|
||||||
opts = {
|
opts = {
|
||||||
servers = {
|
servers = {
|
||||||
lua_ls = {},
|
neocmakelsp = {},
|
||||||
clangd = {
|
lua_ls = {},
|
||||||
cmd = {
|
clangd = {
|
||||||
"/opt/clangd/bin/clangd",
|
cmd = {
|
||||||
--"clangd"),
|
-- "/opt/clangd/bin/clangd",
|
||||||
"--compile-commands-dir=build",
|
"clangd",
|
||||||
"--all-scopes-completion",
|
"--compile-commands-dir=build",
|
||||||
"--background-index",
|
"--all-scopes-completion",
|
||||||
"--clang-tidy",
|
"--background-index",
|
||||||
"--completion-style=bundled",
|
"--clang-tidy",
|
||||||
"--experimental-modules-support",
|
"--completion-style=bundled",
|
||||||
"--function-arg-placeholders=1",
|
"--experimental-modules-support",
|
||||||
"--header-insertion=iwyu",
|
"--function-arg-placeholders=1",
|
||||||
"--header-insertion-decorators",
|
"--header-insertion=iwyu",
|
||||||
"--malloc-trim",
|
"--header-insertion-decorators",
|
||||||
"--pch-storage=memory"
|
"--malloc-trim",
|
||||||
|
"--pch-storage=memory"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
}
|
config = function(_, opts)
|
||||||
},
|
vim.api.nvim_create_autocmd("LspAttach", {
|
||||||
config = function(_, opts)
|
group = vim.api.nvim_create_augroup("UserLspConfig", {}),
|
||||||
local keymap = vim.keymap
|
callback = function(ev)
|
||||||
local autocmd = vim.api.nvim_create_autocmd -- create autocmd
|
local client = vim.lsp.get_client_by_id(ev.data.client_id)
|
||||||
local utils = require("utils")
|
if client and client.server_capabilities.inlayHintProvider then
|
||||||
local map = utils.map
|
vim.lsp.inlay_hint.enable(true)
|
||||||
local augroup = utils.augroup
|
end
|
||||||
vim.api.nvim_create_autocmd("LspAttach", {
|
end,
|
||||||
group = vim.api.nvim_create_augroup("UserLspConfig", {}),
|
|
||||||
callback = function(ev)
|
|
||||||
-- Buffer local mappings.
|
|
||||||
-- See `:help vim.lsp.*` for documentation on any of the below functions
|
|
||||||
local opts = { buffer = ev.buf, silent = true }
|
|
||||||
local bufnr = ev.buf
|
|
||||||
local client = vim.lsp.get_client_by_id(ev.data.client_id)
|
|
||||||
if client.server_capabilities.inlayHintProvider then
|
|
||||||
vim.lsp.inlay_hint.enable(true)
|
|
||||||
end
|
|
||||||
if client.server_capabilities.hoverProvider then
|
|
||||||
map("n", "K", function()
|
|
||||||
vim.lsp.buf.hover()
|
|
||||||
end, opts, "get hover info")
|
|
||||||
end
|
|
||||||
if client.server_capabilities.semanticTokensProvider then
|
|
||||||
map("n", "<leader>us", function()
|
|
||||||
utils.toggle("enable_semantic_tokens", { global = true }, nil)
|
|
||||||
if vim.g["enable_semantic_tokens"] then
|
|
||||||
vim.lsp.semantic_tokens.start(bufnr, client.id)
|
|
||||||
else
|
|
||||||
vim.lsp.semantic_tokens.stop(bufnr, client.id)
|
|
||||||
end
|
|
||||||
end, opts, "toggle semantic token highlighting")
|
|
||||||
end
|
|
||||||
if client.server_capabilities.signatureHelpProvider then
|
|
||||||
map(
|
|
||||||
"n",
|
|
||||||
"<leader>k",
|
|
||||||
vim.lsp.buf.signature_help,
|
|
||||||
opts,
|
|
||||||
"get fn signature help"
|
|
||||||
)
|
|
||||||
end
|
|
||||||
if client.server_capabilities.declarationProvider then
|
|
||||||
map(
|
|
||||||
"n",
|
|
||||||
"<leader>gD",
|
|
||||||
vim.lsp.buf.declaration,
|
|
||||||
opts,
|
|
||||||
"goto declaration"
|
|
||||||
)
|
|
||||||
end
|
|
||||||
-- if client.server_capabilities.completionProvider then
|
|
||||||
-- vim.bo[bufnr].omnifunc = "v:lua.vim.lsp.omnifunc"
|
|
||||||
-- end
|
|
||||||
if client.server_capabilities.definitionProvider then
|
|
||||||
-- vim.bo[bufnr].tagfunc = "v:lua.vim.lsp.tagfunc"
|
|
||||||
map("n", "<leader>gd", function()
|
|
||||||
if utils.has("lspsaga.nvim") then
|
|
||||||
vim.cmd([[Lspsaga goto_definition]])
|
|
||||||
else
|
|
||||||
vim.lsp.buf.definition()
|
|
||||||
end
|
|
||||||
end, opts, "goto definition")
|
|
||||||
|
|
||||||
if utils.has("lspsaga.nvim") then
|
|
||||||
map("n", "<leader>pd", function()
|
|
||||||
vim.cmd([[Lspsaga peek_definition]])
|
|
||||||
end, opts, "peek definition")
|
|
||||||
end
|
|
||||||
end
|
|
||||||
if client.server_capabilities.typeDefinitionProvider then
|
|
||||||
map("n", "<leader>gt", function()
|
|
||||||
if utils.has("lspsaga.nvim") then
|
|
||||||
vim.cmd([[Lspsaga goto_type_definition]])
|
|
||||||
else
|
|
||||||
vim.lsp.buf.type_definition()
|
|
||||||
end
|
|
||||||
end, opts, "goto type definition")
|
|
||||||
|
|
||||||
if utils.has("lspsaga.nvim") then
|
|
||||||
map("n", "<leader>pt", function()
|
|
||||||
vim.cmd([[Lspsaga peek_type_definition]])
|
|
||||||
end, opts, "peek type definition")
|
|
||||||
end
|
|
||||||
end
|
|
||||||
if client.server_capabilities.implementationProvider then
|
|
||||||
map("n", "<leader>gi", function()
|
|
||||||
if utils.has("lspsaga.nvim") then
|
|
||||||
vim.cmd([[Lspsaga finder imp+def]])
|
|
||||||
else
|
|
||||||
vim.lsp.buf.implementation()
|
|
||||||
end
|
|
||||||
end, opts, "goto type implementation")
|
|
||||||
end
|
|
||||||
if client.server_capabilities.referencesProvider then
|
|
||||||
map("n", "<leader>gr", function()
|
|
||||||
if utils.has("lspsaga.nvim") then
|
|
||||||
vim.cmd([[Lspsaga finder ref]])
|
|
||||||
else
|
|
||||||
vim.lsp.buf.references({})
|
|
||||||
end
|
|
||||||
end, opts, "goto type references")
|
|
||||||
end
|
|
||||||
if client.server_capabilities.documentHighlightProvider then
|
|
||||||
vim.api.nvim_set_hl(0, "LspReferenceRead", {
|
|
||||||
link = "DiffText",
|
|
||||||
})
|
})
|
||||||
vim.api.nvim_set_hl(0, "LspReferenceText", {
|
|
||||||
link = "IncSearch",
|
for server, config in pairs(opts.servers) do
|
||||||
|
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||||
|
capabilities.textDocument.foldingRange = {
|
||||||
|
dynamicRegistration = false,
|
||||||
|
lineFoldingOnly = true,
|
||||||
|
}
|
||||||
|
config.capabilities = require("blink.cmp").get_lsp_capabilities(capabilities)
|
||||||
|
vim.lsp.config(server, config)
|
||||||
|
vim.lsp.enable(server)
|
||||||
|
end
|
||||||
|
|
||||||
|
vim.api.nvim_create_user_command("LspInfo", "checkhealth vim.lsp", {
|
||||||
|
desc = "Show LSP Info",
|
||||||
})
|
})
|
||||||
vim.api.nvim_set_hl(0, "LspRefDiffTexterenceWrite", {
|
|
||||||
link = "WildMenu",
|
vim.api.nvim_create_user_command("LspLog", function(_)
|
||||||
|
local log_path = vim.lsp.log.get_filename()
|
||||||
|
vim.cmd(string.format("edit %s", log_path))
|
||||||
|
end, {
|
||||||
|
desc = "Show LSP log",
|
||||||
})
|
})
|
||||||
local doc_highlight = augroup("lsp_document_highlight")
|
|
||||||
local enable_highlight = function()
|
|
||||||
autocmd({ "CursorHold", "CursorHoldI" }, {
|
|
||||||
group = doc_highlight,
|
|
||||||
buffer = bufnr,
|
|
||||||
callback = vim.lsp.buf.document_highlight,
|
|
||||||
})
|
|
||||||
autocmd("CursorMoved", {
|
|
||||||
group = doc_highlight,
|
|
||||||
buffer = bufnr,
|
|
||||||
callback = vim.lsp.buf.clear_references,
|
|
||||||
})
|
|
||||||
end
|
|
||||||
local disable_highlight = function()
|
|
||||||
vim.lsp.buf.clear_references()
|
|
||||||
vim.api.nvim_clear_autocmds({
|
|
||||||
buffer = bufnr,
|
|
||||||
group = doc_highlight,
|
|
||||||
})
|
|
||||||
end
|
|
||||||
map("n", "<leader>uh", function()
|
|
||||||
utils.toggle(
|
|
||||||
"highlight",
|
|
||||||
{},
|
|
||||||
{ enable_highlight, disable_highlight }
|
|
||||||
)
|
|
||||||
vim.b[vim.fn.bufnr()]["highlight"]()
|
|
||||||
end, opts, "toggle document highlight")
|
|
||||||
end
|
|
||||||
if client.server_capabilities.documentSymbolProvider then
|
|
||||||
map(
|
|
||||||
"n",
|
|
||||||
"<leader>ds",
|
|
||||||
vim.lsp.buf.document_symbol,
|
|
||||||
opts,
|
|
||||||
"document symbols"
|
|
||||||
)
|
|
||||||
end
|
|
||||||
if client.server_capabilities.codeActionProvider then
|
|
||||||
map({ "n", "v" }, "<leader>ca", function()
|
|
||||||
if utils.has("lspsaga.nvim") then
|
|
||||||
vim.cmd([[Lspsaga code_action]])
|
|
||||||
else
|
|
||||||
vim.lsp.buf.code_action()
|
|
||||||
end
|
|
||||||
end, opts, "code action")
|
|
||||||
end
|
|
||||||
if client.server_capabilities.documentFormattingProvider then
|
|
||||||
map("n", "<leader>uf", function()
|
|
||||||
utils.toggle("autoformat", { global = true })
|
|
||||||
autocmd("BufWritePre", {
|
|
||||||
group = augroup("LspFormat"),
|
|
||||||
callback = function()
|
|
||||||
if vim.g["autoformat"] then
|
|
||||||
vim.lsp.buf.format({ async = true })
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
end, opts, "toggle autoformat")
|
|
||||||
|
|
||||||
map("n", "<leader>f", function()
|
vim.api.nvim_create_user_command("LspRestart", "lsp restart", {
|
||||||
vim.lsp.buf.format({ async = true })
|
desc = "Restart LSP",
|
||||||
end, opts, "range format buffer")
|
})
|
||||||
end
|
|
||||||
if client.server_capabilities.documentRangeFormattingProvider then
|
|
||||||
map("v", "<leader>f", function()
|
|
||||||
vim.lsp.buf.format({ async = true })
|
|
||||||
end, opts, "range format buffer")
|
|
||||||
end
|
|
||||||
if client.server_capabilities.renameProvider then
|
|
||||||
map("n", "<leader>rn", function()
|
|
||||||
vim.lsp.buf.rename()
|
|
||||||
end, opts, "rename symbol")
|
|
||||||
|
|
||||||
if utils.has("lspsaga.nvim") then
|
vim.api.nvim_create_autocmd("LspProgress", {
|
||||||
map("n", "<leader>rnw", function()
|
callback = function(ev)
|
||||||
vim.cmd([[Lspsaga project_replace]])
|
local value = ev.data.params.value
|
||||||
end, opts, "rename across workspace")
|
vim.api.nvim_echo({ { value.message or "done" } }, false, {
|
||||||
end
|
id = "lsp." .. ev.data.client_id,
|
||||||
end
|
kind = "progress",
|
||||||
if client.server_capabilities.callHierarchyProvider then
|
source = "vim.lsp",
|
||||||
map("n", "<leader>ci", function()
|
title = value.title,
|
||||||
if utils.has("lspsaga.nvim") then
|
status = value.kind ~= "end" and "running" or "success",
|
||||||
vim.cmd([[Lspsaga incoming_calls]])
|
percent = value.percentage,
|
||||||
else
|
})
|
||||||
vim.lsp.buf.incoming_calls()
|
end,
|
||||||
end
|
})
|
||||||
end, opts, "incoming calls")
|
end,
|
||||||
map("n", "<leader>co", function()
|
|
||||||
if utils.has("lspsaga.nvim") then
|
|
||||||
vim.cmd([[Lspsaga outgoing_calls]])
|
|
||||||
else
|
|
||||||
vim.lsp.buf.outgoing_calls()
|
|
||||||
end
|
|
||||||
end, opts, "outgoing calls")
|
|
||||||
end
|
|
||||||
if client.server_capabilities.workspaceSymbolProvider then
|
|
||||||
map(
|
|
||||||
"n",
|
|
||||||
"<leader>ws",
|
|
||||||
vim.lsp.buf.workspace_symbol,
|
|
||||||
opts,
|
|
||||||
"list workspace symbols"
|
|
||||||
)
|
|
||||||
end
|
|
||||||
|
|
||||||
map("n", "[d", function()
|
|
||||||
if utils.has("lspsaga.nvim") then
|
|
||||||
vim.cmd([[Lspsaga diagnostic_jump_prev]])
|
|
||||||
else
|
|
||||||
vim.diagnostic.jump({count = -1, float = true})
|
|
||||||
end
|
|
||||||
end, opts, "goto previous diagnostics")
|
|
||||||
map("n", "]d", function()
|
|
||||||
if utils.has("lspsaga.nvim") then
|
|
||||||
vim.cmd([[Lspsaga diagnostic_jump_next]])
|
|
||||||
else
|
|
||||||
vim.diagnostic.jump({count = 1, float = true})
|
|
||||||
end
|
|
||||||
end, opts, "goto next diagnostics")
|
|
||||||
|
|
||||||
if utils.has("lspsaga.nvim") then
|
|
||||||
map("n", "<leader>wd", function()
|
|
||||||
vim.cmd([[Lspsaga show_workspace_diagnostics]]) --can use ++normal to show in loclist
|
|
||||||
end, opts, "workspace diagnostics")
|
|
||||||
map("n", "<leader>bd", function()
|
|
||||||
vim.cmd([[Lspsaga show_buf_diagnostics]])
|
|
||||||
end, opts, "workspace diagnostics")
|
|
||||||
map("n", "<leader>wo", function()
|
|
||||||
vim.cmd([[Lspsaga outline]])
|
|
||||||
end, opts, "workspace outline")
|
|
||||||
end
|
|
||||||
map("n", "<leader>sl", vim.diagnostic.setloclist, opts, "set loclist")
|
|
||||||
map("n", "<leader>of", vim.diagnostic.open_float, opts, "open float")
|
|
||||||
|
|
||||||
map("n", "<leader>wf", function()
|
|
||||||
vim.print(vim.lsp.buf.list_workspace_folders())
|
|
||||||
end, opts, "list workspace folders")
|
|
||||||
map("n", "<leader>rd", function()
|
|
||||||
print(
|
|
||||||
"Language server "
|
|
||||||
.. (vim.lsp.buf.server_ready() and "is ready" or "is not ready")
|
|
||||||
)
|
|
||||||
end, opts, "check if lsp is ready")
|
|
||||||
|
|
||||||
-- K for hover is now a built-in default in Neovim 0.12
|
|
||||||
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
for server, config in pairs(opts.servers) do
|
|
||||||
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
|
||||||
capabilities.textDocument.foldingRange = {
|
|
||||||
dynamicRegistration = false,
|
|
||||||
lineFoldingOnly = true,
|
|
||||||
}
|
|
||||||
-- passing config.capabilities to blink.cmp merges with the capabilities in your
|
|
||||||
-- `opts[server].capabilities, if you've defined it
|
|
||||||
config.capabilities = require('blink.cmp').get_lsp_capabilities(capabilities)
|
|
||||||
vim.lsp.config(server, config)
|
|
||||||
vim.lsp.enable(server)
|
|
||||||
end
|
|
||||||
vim.api.nvim_create_user_command("LspInfo", "checkhealth vim.lsp", {
|
|
||||||
desc = "Show LSP Info",
|
|
||||||
})
|
|
||||||
|
|
||||||
vim.api.nvim_create_user_command("LspLog", function(_)
|
|
||||||
local log_path = vim.lsp.log.get_filename()
|
|
||||||
|
|
||||||
vim.cmd(string.format("edit %s", log_path))
|
|
||||||
end, {
|
|
||||||
desc = "Show LSP log",
|
|
||||||
})
|
|
||||||
|
|
||||||
vim.api.nvim_create_user_command("LspRestart", "lsp restart", {
|
|
||||||
desc = "Restart LSP",
|
|
||||||
})
|
|
||||||
|
|
||||||
--- show LSP progress (works on Ghostty)
|
|
||||||
vim.api.nvim_create_autocmd("LspProgress", {
|
|
||||||
callback = function(ev)
|
|
||||||
local value = ev.data.params.value
|
|
||||||
vim.api.nvim_echo({ { value.message or "done" } }, false, {
|
|
||||||
id = "lsp." .. ev.data.client_id,
|
|
||||||
kind = "progress",
|
|
||||||
source = "vim.lsp",
|
|
||||||
title = value.title,
|
|
||||||
status = value.kind ~= "end" and "running" or "success",
|
|
||||||
percent = value.percentage,
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
end
|
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
return {
|
||||||
|
"stevearc/overseer.nvim",
|
||||||
|
---@module 'overseer'
|
||||||
|
---@type overseer.SetupOpts
|
||||||
|
opts = {
|
||||||
|
default_template_prompt = "always",
|
||||||
|
template_dirs = { vim.fn.stdpath("config") .. "/lua/overseer/template" },
|
||||||
|
templates = { "builtin", "cmake_cpp_modules_provider", "run_watch_provider" },
|
||||||
|
},
|
||||||
|
}
|
||||||
@@ -1,8 +1,14 @@
|
|||||||
return {
|
return {
|
||||||
'nvim-telescope/telescope.nvim',
|
"nvim-telescope/telescope.nvim",
|
||||||
dependencies = {
|
dependencies = {
|
||||||
'nvim-lua/plenary.nvim',
|
"nvim-lua/plenary.nvim",
|
||||||
-- optional but recommended
|
"nvim-telescope/telescope-file-browser.nvim",
|
||||||
{ 'nvim-telescope/telescope-fzf-native.nvim', build = 'make' },
|
-- optional but recommended
|
||||||
}
|
{ "nvim-telescope/telescope-fzf-native.nvim", build = "make" },
|
||||||
|
},
|
||||||
|
opts = {},
|
||||||
|
config = function(opts)
|
||||||
|
require("telescope").setup(opts)
|
||||||
|
require("telescope").load_extension("file_browser")
|
||||||
|
end,
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
return {
|
||||||
|
"nvim-neotest/neotest",
|
||||||
|
name = "neotest",
|
||||||
|
dependencies = {
|
||||||
|
"nvim-neotest/nvim-nio",
|
||||||
|
"nvim-lua/plenary.nvim",
|
||||||
|
"antoinemadec/FixCursorHold.nvim",
|
||||||
|
"nvim-treesitter/nvim-treesitter",
|
||||||
|
"nvim-neotest/neotest-plenary",
|
||||||
|
"alfaix/neotest-gtest",
|
||||||
|
"orjangj/neotest-ctest",
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
require("neotest").setup({
|
||||||
|
adapters = {
|
||||||
|
require("neotest-ctest").setup({}),
|
||||||
|
require("neotest-gtest").setup({}),
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
}
|
||||||
+56
-38
@@ -1,40 +1,58 @@
|
|||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"serhez/teide.nvim",
|
"serhez/teide.nvim",
|
||||||
lazy = false,
|
lazy = false,
|
||||||
priority = 1000,
|
priority = 1000,
|
||||||
opts = {
|
opts = {
|
||||||
on_highlights = function(hl, c)
|
on_highlights = function(hl, c)
|
||||||
local prompt = "#2d3149"
|
local prompt = "#2d3149"
|
||||||
hl.TelescopeNormal = {
|
hl.TelescopeNormal = {
|
||||||
bg = c.bg_dark,
|
bg = c.bg_dark,
|
||||||
fg = c.fg_dark,
|
fg = c.fg_dark,
|
||||||
}
|
}
|
||||||
hl.TelescopeBorder = {
|
hl.TelescopeBorder = {
|
||||||
bg = c.bg_dark,
|
bg = c.bg_dark,
|
||||||
fg = c.bg_dark,
|
fg = c.bg_dark,
|
||||||
}
|
}
|
||||||
hl.TelescopePromptNormal = {
|
hl.TelescopePromptNormal = {
|
||||||
bg = prompt,
|
bg = prompt,
|
||||||
}
|
}
|
||||||
hl.TelescopePromptBorder = {
|
hl.TelescopePromptBorder = {
|
||||||
bg = prompt,
|
bg = prompt,
|
||||||
fg = prompt,
|
fg = prompt,
|
||||||
}
|
}
|
||||||
hl.TelescopePromptTitle = {
|
hl.TelescopePromptTitle = {
|
||||||
bg = prompt,
|
bg = prompt,
|
||||||
fg = prompt,
|
fg = prompt,
|
||||||
}
|
}
|
||||||
hl.TelescopePreviewTitle = {
|
hl.TelescopePreviewTitle = {
|
||||||
bg = c.bg_dark,
|
bg = c.bg_dark,
|
||||||
fg = c.bg_dark,
|
fg = c.bg_dark,
|
||||||
}
|
}
|
||||||
hl.TelescopeResultsTitle = {
|
hl.TelescopeResultsTitle = {
|
||||||
bg = c.bg_dark,
|
bg = c.bg_dark,
|
||||||
fg = c.bg_dark,
|
fg = c.bg_dark,
|
||||||
}
|
}
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
}
|
},
|
||||||
-- "nyoom-engineering/oxocarbon.nvim"
|
{
|
||||||
|
"hyperb1iss/silkcircuit",
|
||||||
|
name = "silkcircuit",
|
||||||
|
opts = {
|
||||||
|
variant = "glow",
|
||||||
|
},
|
||||||
|
config = function(opts)
|
||||||
|
vim.opt.termguicolors = true
|
||||||
|
require("silkcircuit").setup(opts)
|
||||||
|
vim.cmd.colorscheme("silkcircuit")
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"RRethy/base16-nvim",
|
||||||
|
config = function()
|
||||||
|
-- require("matugen").setup()
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
-- "nyoom-engineering/oxocarbon.nvim"
|
||||||
}
|
}
|
||||||
+72
-69
@@ -1,79 +1,49 @@
|
|||||||
return {
|
return {
|
||||||
-- indent guides for Neovim
|
|
||||||
{
|
|
||||||
"lukas-reineke/indent-blankline.nvim",
|
|
||||||
event = { "BufReadPre", "BufNewFile" },
|
|
||||||
main = "ibl",
|
|
||||||
opts = {
|
|
||||||
indent = {
|
|
||||||
char = "▏",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
-- active indent guide and indent text objects
|
|
||||||
{
|
|
||||||
"echasnovski/mini.indentscope",
|
|
||||||
event = { "BufReadPre", "BufNewFile" },
|
|
||||||
opts = {
|
|
||||||
-- symbol = "▏",
|
|
||||||
symbol = "│",
|
|
||||||
options = { try_as_border = true },
|
|
||||||
},
|
|
||||||
init = function()
|
|
||||||
vim.api.nvim_create_autocmd("FileType", {
|
|
||||||
pattern = {
|
|
||||||
"help",
|
|
||||||
"alpha",
|
|
||||||
"dashboard",
|
|
||||||
"neo-tree",
|
|
||||||
"Trouble",
|
|
||||||
"lazy",
|
|
||||||
"mason",
|
|
||||||
"notify",
|
|
||||||
"toggleterm",
|
|
||||||
"lazyterm",
|
|
||||||
},
|
|
||||||
callback = function()
|
|
||||||
vim.b.miniindentscope_disable = true
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
-- better vim.ui
|
-- better vim.ui
|
||||||
{ "MunifTanjim/nui.nvim", lazy = true },
|
{ "MunifTanjim/nui.nvim", lazy = true },
|
||||||
-- Better `vim.notify()`
|
|
||||||
{
|
|
||||||
"rcarriga/nvim-notify",
|
|
||||||
lazy = true,
|
|
||||||
keys = {
|
|
||||||
{
|
|
||||||
"<leader>un",
|
|
||||||
function()
|
|
||||||
require("notify").dismiss({ silent = true, pending = true })
|
|
||||||
end,
|
|
||||||
desc = "Clear notifications",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
opts = { timeout = 3000 },
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"folke/noice.nvim",
|
"folke/noice.nvim",
|
||||||
event = "VeryLazy",
|
event = "VeryLazy",
|
||||||
opts = {
|
opts = {
|
||||||
|
views = {
|
||||||
|
cmdline_popup = {
|
||||||
|
position = {
|
||||||
|
row = 5,
|
||||||
|
col = "50%",
|
||||||
|
},
|
||||||
|
size = {
|
||||||
|
width = 60,
|
||||||
|
height = "auto",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
popupmenu = {
|
||||||
|
relative = "editor",
|
||||||
|
position = {
|
||||||
|
row = 8,
|
||||||
|
col = "50%",
|
||||||
|
},
|
||||||
|
size = {
|
||||||
|
width = 60,
|
||||||
|
height = 10,
|
||||||
|
},
|
||||||
|
border = {
|
||||||
|
style = "rounded",
|
||||||
|
padding = { 0, 1 },
|
||||||
|
},
|
||||||
|
win_options = {
|
||||||
|
winhighlight = { Normal = "Normal", FloatBorder = "DiagnosticInfo" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
lsp = {
|
lsp = {
|
||||||
progress = {
|
progress = {
|
||||||
enabled = false,
|
enabled = false,
|
||||||
},
|
},
|
||||||
override = {
|
override = {
|
||||||
-- override the default lsp markdown formatter with Noice
|
|
||||||
["vim.lsp.util.convert_input_to_markdown_lines"] = true,
|
["vim.lsp.util.convert_input_to_markdown_lines"] = true,
|
||||||
-- override the lsp markdown formatter with Noice
|
|
||||||
["vim.lsp.util.stylize_markdown"] = true,
|
["vim.lsp.util.stylize_markdown"] = true,
|
||||||
-- override cmp documentation with Noice (needs the other options to work)
|
|
||||||
["cmp.entry.get_documentation"] = false,
|
["cmp.entry.get_documentation"] = false,
|
||||||
},
|
},
|
||||||
--NOTE: install parsers for markdown and markdown_inline to see markdown documentation
|
|
||||||
hover = {
|
hover = {
|
||||||
enabled = false,
|
enabled = false,
|
||||||
},
|
},
|
||||||
@@ -81,21 +51,54 @@ return {
|
|||||||
enabled = false,
|
enabled = false,
|
||||||
},
|
},
|
||||||
message = {
|
message = {
|
||||||
enabled = true, -- Messages shown by lsp servers
|
enabled = true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
health = {
|
health = {
|
||||||
checker = false, -- Disable if you don't want health checks to run
|
checker = false,
|
||||||
},
|
},
|
||||||
presets = {
|
presets = {
|
||||||
-- you can enable a preset by setting it to true, or a table that will override the preset config
|
bottom_search = true,
|
||||||
-- you can also add custom presets that you can enable/disable with enabled=true
|
command_palette = true,
|
||||||
bottom_search = false, -- use a classic bottom cmdline for search
|
long_message_to_split = false,
|
||||||
command_palette = true, -- position the cmdline and popupmenu together
|
inc_rename = false,
|
||||||
long_message_to_split = false, -- long messages will be sent to a split
|
lsp_doc_border = false,
|
||||||
inc_rename = false, -- enables an input dialog for inc-rename.nvim
|
|
||||||
lsp_doc_border = false, -- add a border to hover docs and signature help
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
-- Override vim.ui.select AFTER noice sets it up
|
||||||
|
config = function(_, opts)
|
||||||
|
require("noice").setup(opts)
|
||||||
|
vim.ui.select = function(items, select_opts, on_choice)
|
||||||
|
require("snacks.picker").select(items, select_opts, on_choice)
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"folke/snacks.nvim",
|
||||||
|
priority = 1000,
|
||||||
|
lazy = false,
|
||||||
|
---@type snacks.Config
|
||||||
|
opts = {
|
||||||
|
bigfile = { enabled = true },
|
||||||
|
dashboard = {
|
||||||
|
enabled = true,
|
||||||
|
sections = {
|
||||||
|
{ section = "header" },
|
||||||
|
{ section = "keys", gap = 1 },
|
||||||
|
{ icon = " ", title = "Recent Files", section = "recent_files", indent = 2, padding = { 2, 2 } },
|
||||||
|
{ icon = " ", title = "Projects", section = "projects", indent = 2, padding = 2 },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
explorer = { enabled = false },
|
||||||
|
indent = { enabled = true },
|
||||||
|
input = { enabled = true, position = "bottom" },
|
||||||
|
picker = { enabled = true }, -- ENABLE picker
|
||||||
|
notifier = { enabled = true },
|
||||||
|
quickfile = { enabled = true },
|
||||||
|
scope = { enabled = true },
|
||||||
|
scroll = { enabled = true },
|
||||||
|
statuscolumn = { enabled = true },
|
||||||
|
words = { enabled = true },
|
||||||
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
return {
|
||||||
|
-- "Mythos-404/xmake.nvim",
|
||||||
|
-- sem_version = "^3",
|
||||||
|
-- lazy = true,
|
||||||
|
-- event = "BufReadPost",
|
||||||
|
-- config = true,
|
||||||
|
}
|
||||||
Reference in new issue
Block a user