mirror of
https://github.com/LunarVim/LunarVim.git
synced 2025-08-01 00:24:54 +02:00
config refactor
This commit is contained in:
parent
b8182d5aee
commit
4ff04e31f0
8 changed files with 45 additions and 48 deletions
|
@ -72,7 +72,8 @@ O = {
|
||||||
|
|
||||||
plugin = {
|
plugin = {
|
||||||
-- Builtins
|
-- Builtins
|
||||||
ts_playground = { active = false },
|
diffview = { active = false },
|
||||||
|
|
||||||
ts_context_commentstring = { active = false },
|
ts_context_commentstring = { active = false },
|
||||||
ts_hintobjects = { active = false },
|
ts_hintobjects = { active = false },
|
||||||
ts_autotag = { active = false },
|
ts_autotag = { active = false },
|
||||||
|
@ -82,10 +83,7 @@ O = {
|
||||||
telescope_fzy = { active = false },
|
telescope_fzy = { active = false },
|
||||||
telescope_project = { active = false },
|
telescope_project = { active = false },
|
||||||
indent_line = { active = false },
|
indent_line = { active = false },
|
||||||
debug = { active = false },
|
|
||||||
dap_install = { active = false },
|
|
||||||
lush = { active = false },
|
lush = { active = false },
|
||||||
diffview = { active = false },
|
|
||||||
},
|
},
|
||||||
|
|
||||||
user_which_key = {},
|
user_which_key = {},
|
||||||
|
@ -240,3 +238,4 @@ require "lv-floatterm.config"
|
||||||
require "lv-galaxyline.config"
|
require "lv-galaxyline.config"
|
||||||
require "lv-gitsigns.config"
|
require "lv-gitsigns.config"
|
||||||
require "lv-telescope.config"
|
require "lv-telescope.config"
|
||||||
|
require "lv-dap.config"
|
||||||
|
|
9
lua/lv-dap/config.lua
Normal file
9
lua/lv-dap/config.lua
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
O.plugin.dap = {
|
||||||
|
active = false,
|
||||||
|
breakpoint = {
|
||||||
|
text = "",
|
||||||
|
texthl = "LspDiagnosticsSignError",
|
||||||
|
linehl = "",
|
||||||
|
numhl = "",
|
||||||
|
},
|
||||||
|
}
|
|
@ -3,12 +3,7 @@ if not status_ok then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
-- require "dap"
|
-- require "dap"
|
||||||
vim.fn.sign_define("DapBreakpoint", {
|
vim.fn.sign_define("DapBreakpoint", O.plugin.dap.breakpoint)
|
||||||
text = "",
|
|
||||||
texthl = "LspDiagnosticsSignError",
|
|
||||||
linehl = "",
|
|
||||||
numhl = "",
|
|
||||||
})
|
|
||||||
dap.defaults.fallback.terminal_win_cmd = "50vsplit new"
|
dap.defaults.fallback.terminal_win_cmd = "50vsplit new"
|
||||||
|
|
||||||
O.user_which_key["d"] = {
|
O.user_which_key["d"] = {
|
||||||
|
|
|
@ -4,6 +4,7 @@ if not status_ok then
|
||||||
end
|
end
|
||||||
|
|
||||||
O.plugin.telescope = {
|
O.plugin.telescope = {
|
||||||
|
active = false,
|
||||||
defaults = {
|
defaults = {
|
||||||
find_command = {
|
find_command = {
|
||||||
"rg",
|
"rg",
|
||||||
|
|
|
@ -121,7 +121,7 @@ treesitter_configs.setup {
|
||||||
keymaps = { ["."] = "textsubjects-smart", [";"] = "textsubjects-big" },
|
keymaps = { ["."] = "textsubjects-smart", [";"] = "textsubjects-big" },
|
||||||
},
|
},
|
||||||
playground = {
|
playground = {
|
||||||
enable = O.plugin.ts_playground.active,
|
enable = false,
|
||||||
disable = {},
|
disable = {},
|
||||||
updatetime = 25, -- Debounced time for highlighting nodes in the playground from source code
|
updatetime = 25, -- Debounced time for highlighting nodes in the playground from source code
|
||||||
persist_queries = false, -- Whether the query persists across vim sessions
|
persist_queries = false, -- Whether the query persists across vim sessions
|
||||||
|
|
|
@ -188,10 +188,10 @@ local mappings = {
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
if O.plugin.ts_playground.active then
|
-- if O.plugin.ts_playground.active then
|
||||||
vim.api.nvim_set_keymap("n", "<leader>Th", ":TSHighlightCapturesUnderCursor<CR>", { noremap = true, silent = true })
|
-- vim.api.nvim_set_keymap("n", "<leader>Th", ":TSHighlightCapturesUnderCursor<CR>", { noremap = true, silent = true })
|
||||||
mappings[""] = "Highlight Capture"
|
-- mappings[""] = "Highlight Capture"
|
||||||
end
|
-- end
|
||||||
|
|
||||||
if O.plugin.zen.active then
|
if O.plugin.zen.active then
|
||||||
vim.api.nvim_set_keymap("n", "<leader>z", ":ZenMode<CR>", { noremap = true, silent = true })
|
vim.api.nvim_set_keymap("n", "<leader>z", ":ZenMode<CR>", { noremap = true, silent = true })
|
||||||
|
|
|
@ -36,7 +36,7 @@ return require("packer").startup(function(use)
|
||||||
use {
|
use {
|
||||||
"nvim-telescope/telescope.nvim",
|
"nvim-telescope/telescope.nvim",
|
||||||
config = [[require('lv-telescope')]],
|
config = [[require('lv-telescope')]],
|
||||||
--event = "BufEnter",
|
event = "BufWinEnter",
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Autocomplete
|
-- Autocomplete
|
||||||
|
@ -158,13 +158,6 @@ return require("packer").startup(function(use)
|
||||||
disable = not O.plugin.zen.active,
|
disable = not O.plugin.zen.active,
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Treesitter playground
|
|
||||||
use {
|
|
||||||
"nvim-treesitter/playground",
|
|
||||||
event = "BufRead",
|
|
||||||
disable = not O.plugin.ts_playground.active,
|
|
||||||
}
|
|
||||||
|
|
||||||
use {
|
use {
|
||||||
"lukas-reineke/indent-blankline.nvim",
|
"lukas-reineke/indent-blankline.nvim",
|
||||||
event = "BufRead",
|
event = "BufRead",
|
||||||
|
@ -198,7 +191,7 @@ return require("packer").startup(function(use)
|
||||||
config = function()
|
config = function()
|
||||||
require "lv-dap"
|
require "lv-dap"
|
||||||
end,
|
end,
|
||||||
disable = not O.plugin.debug.active,
|
disable = not O.plugin.dap.active,
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Floating terminal
|
-- Floating terminal
|
||||||
|
@ -246,7 +239,7 @@ return require("packer").startup(function(use)
|
||||||
use {
|
use {
|
||||||
"Pocco81/DAPInstall.nvim",
|
"Pocco81/DAPInstall.nvim",
|
||||||
-- event = "BufRead",
|
-- event = "BufRead",
|
||||||
disable = not O.plugin.dap_install.active,
|
disable = not O.plugin.dap.active,
|
||||||
}
|
}
|
||||||
|
|
||||||
-- LANGUAGE SPECIFIC GOES HERE
|
-- LANGUAGE SPECIFIC GOES HERE
|
||||||
|
|
|
@ -59,26 +59,26 @@ opt.wrap = O.wrap_lines -- display lines as one long line
|
||||||
opt.spell = O.spell
|
opt.spell = O.spell
|
||||||
opt.spelllang = O.spelllang
|
opt.spelllang = O.spelllang
|
||||||
opt.scrolloff = 8 -- is one of my fav
|
opt.scrolloff = 8 -- is one of my fav
|
||||||
--local disabled_built_ins = {
|
local disabled_built_ins = {
|
||||||
-- "netrw",
|
"netrw",
|
||||||
-- "netrwPlugin",
|
"netrwPlugin",
|
||||||
-- "netrwSettings",
|
"netrwSettings",
|
||||||
-- "netrwFileHandlers",
|
"netrwFileHandlers",
|
||||||
-- "gzip",
|
"gzip",
|
||||||
-- "zip",
|
"zip",
|
||||||
-- "zipPlugin",
|
"zipPlugin",
|
||||||
-- "tar",
|
"tar",
|
||||||
-- "tarPlugin", -- 'man',
|
"tarPlugin", -- 'man',
|
||||||
-- "getscript",
|
"getscript",
|
||||||
-- "getscriptPlugin",
|
"getscriptPlugin",
|
||||||
-- "vimball",
|
"vimball",
|
||||||
-- "vimballPlugin",
|
"vimballPlugin",
|
||||||
-- "2html_plugin",
|
"2html_plugin",
|
||||||
-- "logipat",
|
"logipat",
|
||||||
-- "rrhelper",
|
"rrhelper",
|
||||||
-- "spellfile_plugin",
|
"spellfile_plugin",
|
||||||
-- -- 'matchit', 'matchparen', 'shada_plugin',
|
-- 'matchit', 'matchparen', 'shada_plugin',
|
||||||
--}
|
}
|
||||||
--for _, plugin in pairs(disabled_built_ins) do
|
for _, plugin in pairs(disabled_built_ins) do
|
||||||
-- vim.g["loaded_" .. plugin] = 1
|
vim.g["loaded_" .. plugin] = 1
|
||||||
--end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue