mirror of
https://github.com/Baipyrus/nvim-config.git
synced 2024-11-14 21:13:49 +00:00
clean up: remove default settings from plugin configs
This commit is contained in:
parent
82e70e57fe
commit
630d557586
@ -2,8 +2,6 @@ return {
|
|||||||
-- add catppuccin
|
-- add catppuccin
|
||||||
{
|
{
|
||||||
"catppuccin/nvim",
|
"catppuccin/nvim",
|
||||||
lazy = true,
|
|
||||||
name = "catppuccin",
|
|
||||||
opts = {
|
opts = {
|
||||||
integrations = {
|
integrations = {
|
||||||
cmp = true,
|
cmp = true,
|
||||||
|
@ -1,11 +1,6 @@
|
|||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
|
|
||||||
"williamboman/mason.nvim",
|
"williamboman/mason.nvim",
|
||||||
cmd = "Mason",
|
|
||||||
keys = { { "<leader>cm", "<cmd>Mason<cr>", desc = "Mason" } },
|
|
||||||
build = ":MasonUpdate",
|
|
||||||
opts_extend = { "ensure_installed" },
|
|
||||||
opts = {
|
opts = {
|
||||||
ensure_installed = {
|
ensure_installed = {
|
||||||
"eslint_d",
|
"eslint_d",
|
||||||
@ -15,28 +10,5 @@ return {
|
|||||||
"powershell-editor-services",
|
"powershell-editor-services",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
---@param opts MasonSettings | {ensure_installed: string[]}
|
|
||||||
config = function(_, opts)
|
|
||||||
require("mason").setup(opts)
|
|
||||||
local mr = require("mason-registry")
|
|
||||||
mr:on("package:install:success", function()
|
|
||||||
vim.defer_fn(function()
|
|
||||||
-- trigger FileType event to possibly load this newly installed LSP server
|
|
||||||
require("lazy.core.handler.event").trigger({
|
|
||||||
event = "FileType",
|
|
||||||
buf = vim.api.nvim_get_current_buf(),
|
|
||||||
})
|
|
||||||
end, 100)
|
|
||||||
end)
|
|
||||||
|
|
||||||
mr.refresh(function()
|
|
||||||
for _, tool in ipairs(opts.ensure_installed) do
|
|
||||||
local p = mr.get_package(tool)
|
|
||||||
if not p:is_installed() then
|
|
||||||
p:install()
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end)
|
|
||||||
end,
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@ -1,20 +1,6 @@
|
|||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"nvim-treesitter/nvim-treesitter",
|
"nvim-treesitter/nvim-treesitter",
|
||||||
version = false, -- last release is way too old and doesn't work on Windows
|
|
||||||
build = ":TSUpdate",
|
|
||||||
event = { "LazyFile", "VeryLazy" },
|
|
||||||
lazy = vim.fn.argc(-1) == 0, -- load treesitter early when opening a file from the cmdline
|
|
||||||
init = function(plugin)
|
|
||||||
-- PERF: add nvim-treesitter queries to the rtp and it's custom query predicates early
|
|
||||||
-- This is needed because a bunch of plugins no longer `require("nvim-treesitter")`, which
|
|
||||||
-- no longer trigger the **nvim-treesitter** module to be loaded in time.
|
|
||||||
-- Luckily, the only things that those plugins need are the custom queries, which we make available
|
|
||||||
-- during startup.
|
|
||||||
require("lazy.core.loader").add_to_rtp(plugin)
|
|
||||||
require("nvim-treesitter.query_predicates")
|
|
||||||
end,
|
|
||||||
cmd = { "TSUpdateSync", "TSUpdate", "TSInstall" },
|
|
||||||
keys = {
|
keys = {
|
||||||
{ "<c-space>", desc = "Increment Selection" },
|
{ "<c-space>", desc = "Increment Selection" },
|
||||||
{ "<bs>", desc = "Decrement Selection", mode = "x" },
|
{ "<bs>", desc = "Decrement Selection", mode = "x" },
|
||||||
@ -24,34 +10,7 @@ return {
|
|||||||
---@diagnostic disable-next-line: missing-fields
|
---@diagnostic disable-next-line: missing-fields
|
||||||
opts = {
|
opts = {
|
||||||
auto_install = true,
|
auto_install = true,
|
||||||
highlight = { enable = true },
|
|
||||||
indent = { enable = true },
|
|
||||||
ensure_installed = {
|
ensure_installed = {
|
||||||
"bash",
|
|
||||||
"c",
|
|
||||||
"diff",
|
|
||||||
"html",
|
|
||||||
"javascript",
|
|
||||||
"jsdoc",
|
|
||||||
"json",
|
|
||||||
"jsonc",
|
|
||||||
"lua",
|
|
||||||
"luadoc",
|
|
||||||
"luap",
|
|
||||||
"markdown",
|
|
||||||
"markdown_inline",
|
|
||||||
"printf",
|
|
||||||
"python",
|
|
||||||
"query",
|
|
||||||
"regex",
|
|
||||||
"toml",
|
|
||||||
"tsx",
|
|
||||||
"typescript",
|
|
||||||
"vim",
|
|
||||||
"vimdoc",
|
|
||||||
"xml",
|
|
||||||
"yaml",
|
|
||||||
-- other
|
|
||||||
"svelte",
|
"svelte",
|
||||||
"php",
|
"php",
|
||||||
"rust",
|
"rust",
|
||||||
@ -61,15 +20,6 @@ return {
|
|||||||
"gitcommit",
|
"gitcommit",
|
||||||
"gitignore",
|
"gitignore",
|
||||||
},
|
},
|
||||||
incremental_selection = {
|
|
||||||
enable = true,
|
|
||||||
keymaps = {
|
|
||||||
init_selection = "<C-space>",
|
|
||||||
node_incremental = "<C-space>",
|
|
||||||
scope_incremental = false,
|
|
||||||
node_decremental = "<bs>",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
textobjects = {
|
textobjects = {
|
||||||
select = {
|
select = {
|
||||||
enable = true,
|
enable = true,
|
||||||
@ -115,12 +65,5 @@ return {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
---@param opts TSConfig
|
|
||||||
config = function(_, opts)
|
|
||||||
if type(opts.ensure_installed) == "table" then
|
|
||||||
opts.ensure_installed = LazyVim.dedup(opts.ensure_installed)
|
|
||||||
end
|
|
||||||
require("nvim-treesitter.configs").setup(opts)
|
|
||||||
end,
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user