this hurts
This commit is contained in:
parent
05b0210dae
commit
e2c332c3ae
2 changed files with 78 additions and 74 deletions
|
@ -1,8 +1,8 @@
|
|||
-- Utilities for creating configurations
|
||||
local util = require "formatter.util"
|
||||
local util = require("formatter.util")
|
||||
|
||||
-- Provides the Format, FormatWrite, FormatLock, and FormatWriteLock commands
|
||||
require("formatter").setup {
|
||||
require("formatter").setup({
|
||||
-- Enable or disable logging
|
||||
logging = true,
|
||||
log_level = vim.log.levels.WARN,
|
||||
|
@ -21,7 +21,7 @@ require("formatter").setup {
|
|||
},
|
||||
stdin = true,
|
||||
}
|
||||
end
|
||||
end,
|
||||
},
|
||||
nix = {
|
||||
require("formatter.filetypes.nix").alejandra,
|
||||
|
@ -30,13 +30,18 @@ require("formatter").setup {
|
|||
exe = "alejandra",
|
||||
stdin = true,
|
||||
args = {
|
||||
"--quiet"
|
||||
"--quiet",
|
||||
},
|
||||
}
|
||||
end
|
||||
end,
|
||||
},
|
||||
["*"] = {
|
||||
require("formatter.filetypes.any").remove_trailing_whitespace
|
||||
}
|
||||
}
|
||||
}
|
||||
require("formatter.filetypes.any").remove_trailing_whitespace,
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
vim.api.nvim_command("augroup FormatAutogroup")
|
||||
vim.api.nvim_command("autocmd!")
|
||||
vim.api.nvim_command("autocmd BufWritePost * FormatWrite")
|
||||
vim.api.nvim_command("augroup END")
|
||||
|
|
|
@ -19,12 +19,11 @@ end
|
|||
local capabilities = require("cmp_nvim_lsp").default_capabilities()
|
||||
|
||||
-- funny lsp config stuff
|
||||
require('lspconfig').nil_ls.setup({
|
||||
require("lspconfig").nil_ls.setup({
|
||||
on_attach = on_attach,
|
||||
capabilities = capabilities,
|
||||
})
|
||||
|
||||
|
||||
require("lspconfig").lua_ls.setup({
|
||||
on_attach = on_attach,
|
||||
capabilities = capabilities,
|
||||
|
@ -74,6 +73,6 @@ require("lspconfig").cssls.setup({
|
|||
capabilities = capabilities,
|
||||
})
|
||||
|
||||
require('lspconfig')['hls'].setup {
|
||||
filetypes = { 'haskell', 'lhaskell', 'cabal' },
|
||||
}
|
||||
require("lspconfig")["hls"].setup({
|
||||
filetypes = { "haskell", "lhaskell", "cabal" },
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue