chore: format source code
This commit is contained in:
parent
ee586047e5
commit
3d0a0e53f7
|
@ -33,9 +33,7 @@ M.plugins = {
|
||||||
-- this string will be called in a `require`
|
-- this string will be called in a `require`
|
||||||
-- use "(custom.configs).my_func()" to call a function
|
-- use "(custom.configs).my_func()" to call a function
|
||||||
-- use "custom.blankline" to call a file
|
-- use "custom.blankline" to call a file
|
||||||
default_plugin_config_replace = {
|
default_plugin_config_replace = {},
|
||||||
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
|
|
@ -10,15 +10,13 @@ local hooks = require "core.hooks"
|
||||||
-- To modify packaged plugin configs, use the overrides functionality
|
-- To modify packaged plugin configs, use the overrides functionality
|
||||||
-- if the override does not exist in the plugin config, make or request a PR,
|
-- if the override does not exist in the plugin config, make or request a PR,
|
||||||
-- or you can override the whole plugin config with 'chadrc' -> M.plugins.default_plugin_config_replace{}
|
-- or you can override the whole plugin config with 'chadrc' -> M.plugins.default_plugin_config_replace{}
|
||||||
-- this will run your config instead of the NvChad config for the given plugin
|
-- this will run your config instead of the NvChad config for the given plugin
|
||||||
|
|
||||||
-- hooks.override("lsp", "publish_diagnostics", function(current)
|
-- hooks.override("lsp", "publish_diagnostics", function(current)
|
||||||
-- current.virtual_text = false;
|
-- current.virtual_text = false;
|
||||||
-- return current;
|
-- return current;
|
||||||
-- end)
|
-- end)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
-- To add new mappings, use the "setup_mappings" hook,
|
-- To add new mappings, use the "setup_mappings" hook,
|
||||||
-- you can set one or many mappings
|
-- you can set one or many mappings
|
||||||
-- example below:
|
-- example below:
|
||||||
|
@ -28,11 +26,9 @@ local hooks = require "core.hooks"
|
||||||
-- .... many more mappings ....
|
-- .... many more mappings ....
|
||||||
-- end)
|
-- end)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
-- To add new plugins, use the "install_plugin" hook,
|
-- To add new plugins, use the "install_plugin" hook,
|
||||||
-- NOTE: we heavily suggest using Packer's lazy loading (with the 'event' field)
|
-- NOTE: we heavily suggest using Packer's lazy loading (with the 'event' field)
|
||||||
-- see: https://github.com/wbthomason/packer.nvim
|
-- see: https://github.com/wbthomason/packer.nvim
|
||||||
-- examples below:
|
-- examples below:
|
||||||
|
|
||||||
-- hooks.add("install_plugins", function(use)
|
-- hooks.add("install_plugins", function(use)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
local present1, nvim_lsp = pcall(require, "lspconfig")
|
local present1, nvim_lsp = pcall(require, "lspconfig")
|
||||||
local overrides = require("core.hooks").createOverrides("lsp")
|
local overrides = require("core.hooks").createOverrides "lsp"
|
||||||
|
|
||||||
if not present1 then
|
if not present1 then
|
||||||
return
|
return
|
||||||
|
@ -82,7 +82,7 @@ lspSymbol("Information", "")
|
||||||
lspSymbol("Hint", "")
|
lspSymbol("Hint", "")
|
||||||
lspSymbol("Warning", "")
|
lspSymbol("Warning", "")
|
||||||
|
|
||||||
local lsp_publish_diagnostics_options = overrides.get('publish_diagnostics', {
|
local lsp_publish_diagnostics_options = overrides.get("publish_diagnostics", {
|
||||||
virtual_text = {
|
virtual_text = {
|
||||||
prefix = "",
|
prefix = "",
|
||||||
spacing = 0,
|
spacing = 0,
|
||||||
|
@ -91,7 +91,10 @@ local lsp_publish_diagnostics_options = overrides.get('publish_diagnostics', {
|
||||||
underline = true,
|
underline = true,
|
||||||
update_in_insert = false, -- update diagnostics insert mode
|
update_in_insert = false, -- update diagnostics insert mode
|
||||||
})
|
})
|
||||||
vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with(vim.lsp.diagnostic.on_publish_diagnostics, lsp_publish_diagnostics_options)
|
vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with(
|
||||||
|
vim.lsp.diagnostic.on_publish_diagnostics,
|
||||||
|
lsp_publish_diagnostics_options
|
||||||
|
)
|
||||||
vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, {
|
vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, {
|
||||||
border = "single",
|
border = "single",
|
||||||
})
|
})
|
||||||
|
|
|
@ -23,7 +23,7 @@ return packer.startup(function()
|
||||||
result = override
|
result = override
|
||||||
end
|
end
|
||||||
|
|
||||||
if string.match(result, '^%(') then
|
if string.match(result, "^%(") then
|
||||||
result = result:sub(2)
|
result = result:sub(2)
|
||||||
result = result:gsub("%)%.", "').", 1)
|
result = result:gsub("%)%.", "').", 1)
|
||||||
return "require('" .. result
|
return "require('" .. result
|
||||||
|
@ -79,7 +79,6 @@ return packer.startup(function()
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
use {
|
use {
|
||||||
"lukas-reineke/indent-blankline.nvim",
|
"lukas-reineke/indent-blankline.nvim",
|
||||||
disable = not plugin_status.blankline,
|
disable = not plugin_status.blankline,
|
||||||
|
|
Loading…
Reference in New Issue