misc
This commit is contained in:
parent
cb97cef2a7
commit
1a1bc99f1b
@ -5,6 +5,7 @@ if not present then
|
||||
end
|
||||
|
||||
local M = {}
|
||||
local utils = require "core.utils"
|
||||
|
||||
require("plugins.configs.others").lsp_handlers()
|
||||
|
||||
@ -22,8 +23,8 @@ M.on_attach = function(client, bufnr)
|
||||
client.resolved_capabilities.document_formatting = false
|
||||
client.resolved_capabilities.document_range_formatting = false
|
||||
|
||||
local lsp_mappings = require("core.utils").load_config().mappings.lspconfig
|
||||
require("core.utils").load_mappings({ lsp_mappings }, { buffer = bufnr })
|
||||
local lsp_mappings = utils.load_config().mappings.lspconfig
|
||||
utils.load_mappings({ lsp_mappings }, { buffer = bufnr })
|
||||
end
|
||||
|
||||
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||
@ -68,7 +69,7 @@ lspconfig.sumneko_lua.setup {
|
||||
}
|
||||
|
||||
-- requires a file containing user's lspconfigs
|
||||
local addlsp_confs = require("core.utils").load_config().plugins.options.lspconfig.setup_lspconf
|
||||
local addlsp_confs = utils.load_config().plugins.options.lspconfig.setup_lspconf
|
||||
|
||||
if #addlsp_confs ~= 0 then
|
||||
require(addlsp_confs).setup_lsp(M.on_attach, capabilities)
|
||||
|
@ -1,3 +1,5 @@
|
||||
local lazy_load = require("core.utils").packer_lazy_load
|
||||
|
||||
local plugins = {
|
||||
|
||||
["nvim-lua/plenary.nvim"] = {},
|
||||
@ -71,7 +73,7 @@ local plugins = {
|
||||
config = function()
|
||||
require("plugins.configs.others").gitsigns()
|
||||
end,
|
||||
setup = require("core.utils").packer_lazy_load "gitsigns.nvim",
|
||||
setup = lazy_load "gitsigns.nvim",
|
||||
},
|
||||
|
||||
-- lsp stuff
|
||||
@ -105,7 +107,7 @@ local plugins = {
|
||||
|
||||
["andymass/vim-matchup"] = {
|
||||
opt = true,
|
||||
setup = require("core.utils").packer_lazy_load "vim-matchup",
|
||||
setup = lazy_load "vim-matchup",
|
||||
},
|
||||
|
||||
["max397574/better-escape.nvim"] = {
|
||||
@ -198,7 +200,7 @@ local plugins = {
|
||||
|
||||
["folke/which-key.nvim"] = {
|
||||
opt = true,
|
||||
setup = require("core.utils").packer_lazy_load "which-key.nvim",
|
||||
setup = lazy_load "which-key.nvim",
|
||||
config = function()
|
||||
require "plugins.configs.whichkey"
|
||||
end,
|
||||
|
Loading…
Reference in New Issue
Block a user