1
0
Fork 0

Revert diagnostic changes

This commit is contained in:
Daniel Kempkens 2021-12-20 21:43:35 +01:00
parent 957d89f177
commit 9942150bd3

View file

@ -3,9 +3,7 @@ local M = {}
local keymap = require('nifoc.keymap') local keymap = require('nifoc.keymap')
function M.maybe_enable_lsp(client, bufnr) function M.maybe_enable_lsp(client, bufnr)
local nifoc_lsp_enabled = vim.api.nvim_buf_get_var(bufnr, 'nifoc_lsp_enabled') if vim.b.nifoc_lsp_enabled == nil then
if nifoc_lsp_enabled == nil then
vim.api.nvim_buf_set_var(bufnr, 'nifoc_lsp_enabled', 1) vim.api.nvim_buf_set_var(bufnr, 'nifoc_lsp_enabled', 1)
keymap.lsp_attach(client, bufnr) keymap.lsp_attach(client, bufnr)
@ -13,9 +11,7 @@ function M.maybe_enable_lsp(client, bufnr)
end end
function M.maybe_enable_fixer(client, bufnr) function M.maybe_enable_fixer(client, bufnr)
local nifoc_fixer_enabled = vim.api.nvim_buf_get_var(bufnr, 'nifoc_fixer_enabled') if client.resolved_capabilities.document_formatting and vim.b.nifoc_fixer_enabled == nil then
if client.resolved_capabilities.document_formatting and nifoc_fixer_enabled == nil then
vim.api.nvim_buf_set_var(bufnr, 'nifoc_fixer_enabled', 1) vim.api.nvim_buf_set_var(bufnr, 'nifoc_fixer_enabled', 1)
vim.cmd [[ vim.cmd [[