Remove global formatting configuration
Will be replaced with project specific configurations
This commit is contained in:
parent
87f05c5d83
commit
f21944eb52
3 changed files with 0 additions and 27 deletions
|
|
@ -11,5 +11,4 @@ require('indent-blankline')
|
||||||
require('_nvim-tree')
|
require('_nvim-tree')
|
||||||
require('lua-line')
|
require('lua-line')
|
||||||
require('_source-link')
|
require('_source-link')
|
||||||
require('formatting')
|
|
||||||
require('diagnostic')
|
require('diagnostic')
|
||||||
|
|
|
||||||
|
|
@ -1,24 +0,0 @@
|
||||||
-- {{ ansible_managed }}
|
|
||||||
|
|
||||||
local enable_formatting = vim.env.enable_formatting == 'true';
|
|
||||||
|
|
||||||
if (enable_formatting) then
|
|
||||||
vim.api.nvim_create_autocmd('LspAttach', {
|
|
||||||
group = vim.api.nvim_create_augroup('lsp', { clear = true }),
|
|
||||||
callback = function(args)
|
|
||||||
local client = vim.lsp.get_client_by_id(args.data.client_id)
|
|
||||||
|
|
||||||
if client.server_capabilities.documentFormattingProvider then
|
|
||||||
vim.api.nvim_create_autocmd('BufWritePre', {
|
|
||||||
buffer = args.buf,
|
|
||||||
callback = function()
|
|
||||||
vim.lsp.buf.format {
|
|
||||||
async = false,
|
|
||||||
id = args.data.client_id
|
|
||||||
}
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
end
|
|
||||||
end
|
|
||||||
})
|
|
||||||
end
|
|
||||||
|
|
@ -23,10 +23,8 @@ local on_attach = function(client, bufnr)
|
||||||
vim.keymap.set('n', ']d', vim.diagnostic.goto_next, opts)
|
vim.keymap.set('n', ']d', vim.diagnostic.goto_next, opts)
|
||||||
vim.keymap.set('n', '<space>q', vim.diagnostic.setloclist, opts)
|
vim.keymap.set('n', '<space>q', vim.diagnostic.setloclist, opts)
|
||||||
vim.keymap.set('n', '<space>la', vim.lsp.buf.code_action, opts)
|
vim.keymap.set('n', '<space>la', vim.lsp.buf.code_action, opts)
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--enable some language servers with the additional completion capabilities
|
--enable some language servers with the additional completion capabilities
|
||||||
--offered by nvim-cmp
|
--offered by nvim-cmp
|
||||||
local servers = {
|
local servers = {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue