feat(nvim): do not override formatexpr for markdown files
This commit is contained in:
parent
6951329a50
commit
61e9726986
@ -4,7 +4,14 @@ return {
|
|||||||
event = { "BufReadPre", "BufNewFile" },
|
event = { "BufReadPre", "BufNewFile" },
|
||||||
opts = function()
|
opts = function()
|
||||||
local null_ls = require("null-ls")
|
local null_ls = require("null-ls")
|
||||||
|
local function on_attach(client, bufnr)
|
||||||
|
local ft = vim.api.nvim_get_option_value("filetype", { buf = bufnr })
|
||||||
|
if ft == "markdown" then
|
||||||
|
vim.api.nvim_set_option_value("formatexpr", nil, { buf = bufnr })
|
||||||
|
end
|
||||||
|
end
|
||||||
return {
|
return {
|
||||||
|
on_attach = on_attach,
|
||||||
sources = {
|
sources = {
|
||||||
null_ls.builtins.diagnostics.hadolint,
|
null_ls.builtins.diagnostics.hadolint,
|
||||||
null_ls.builtins.code_actions.refactoring,
|
null_ls.builtins.code_actions.refactoring,
|
||||||
|
Loading…
Reference in New Issue
Block a user