fix editorConfig indent opts not applying on certain fts #2633
This commit is contained in:
parent
0333185bfc
commit
b2e2b15b45
4 changed files with 31 additions and 67 deletions
lua/plugins
|
@ -4,7 +4,7 @@ local M = {}
|
|||
M.on_attach = function(client, bufnr)
|
||||
local utils = require "core.utils"
|
||||
local conf = require("nvconfig").ui.lsp
|
||||
|
||||
|
||||
-- semanticTokens
|
||||
if not conf.semantic_tokens and client.supports_method "textDocument/semanticTokens" then
|
||||
client.server_capabilities.semanticTokensProvider = nil
|
||||
|
@ -14,9 +14,6 @@ M.on_attach = function(client, bufnr)
|
|||
require("nvchad.signature").setup(client, bufnr)
|
||||
end
|
||||
|
||||
client.server_capabilities.documentFormattingProvider = false
|
||||
client.server_capabilities.documentRangeFormattingProvider = false
|
||||
|
||||
utils.load_mappings("lspconfig", { buffer = bufnr })
|
||||
end
|
||||
|
||||
|
|
|
@ -23,9 +23,7 @@ local default_plugins = {
|
|||
|
||||
{
|
||||
"NvChad/nvim-colorizer.lua",
|
||||
init = function()
|
||||
require("core.utils").lazy_load "nvim-colorizer.lua"
|
||||
end,
|
||||
event = "User FilePost",
|
||||
config = function(_, opts)
|
||||
require("colorizer").setup(opts)
|
||||
|
||||
|
@ -49,9 +47,7 @@ local default_plugins = {
|
|||
|
||||
{
|
||||
"lukas-reineke/indent-blankline.nvim",
|
||||
init = function()
|
||||
require("core.utils").lazy_load "indent-blankline.nvim"
|
||||
end,
|
||||
event = "User FilePost",
|
||||
opts = function()
|
||||
return require("plugins.configs.others").blankline
|
||||
end,
|
||||
|
@ -67,9 +63,7 @@ local default_plugins = {
|
|||
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
init = function()
|
||||
require("core.utils").lazy_load "nvim-treesitter"
|
||||
end,
|
||||
event = { "BufReadPost", "BufNewFile" },
|
||||
cmd = { "TSInstall", "TSBufEnable", "TSBufDisable", "TSModuleInfo" },
|
||||
build = ":TSUpdate",
|
||||
opts = function()
|
||||
|
@ -85,27 +79,7 @@ local default_plugins = {
|
|||
-- git stuff
|
||||
{
|
||||
"lewis6991/gitsigns.nvim",
|
||||
ft = { "gitcommit", "diff" },
|
||||
init = function()
|
||||
-- load gitsigns only when a git file is opened
|
||||
vim.api.nvim_create_autocmd({ "BufRead" }, {
|
||||
group = vim.api.nvim_create_augroup("GitSignsLazyLoad", { clear = true }),
|
||||
callback = function()
|
||||
vim.fn.jobstart({"git", "-C", vim.loop.cwd(), "rev-parse"},
|
||||
{
|
||||
on_exit = function(_, return_code)
|
||||
if return_code == 0 then
|
||||
vim.api.nvim_del_augroup_by_name "GitSignsLazyLoad"
|
||||
vim.schedule(function()
|
||||
require("lazy").load { plugins = { "gitsigns.nvim" } }
|
||||
end)
|
||||
end
|
||||
end
|
||||
}
|
||||
)
|
||||
end,
|
||||
})
|
||||
end,
|
||||
event = "User FilePost",
|
||||
opts = function()
|
||||
return require("plugins.configs.others").gitsigns
|
||||
end,
|
||||
|
@ -139,9 +113,7 @@ local default_plugins = {
|
|||
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
init = function()
|
||||
require("core.utils").lazy_load "nvim-lspconfig"
|
||||
end,
|
||||
event = "User FilePost",
|
||||
config = function()
|
||||
require("plugins.configs.lspconfig").defaults()
|
||||
end,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue