this hurts
This commit is contained in:
parent
05b0210dae
commit
e2c332c3ae
|
@ -1,8 +1,8 @@
|
||||||
-- Utilities for creating configurations
|
-- Utilities for creating configurations
|
||||||
local util = require "formatter.util"
|
local util = require("formatter.util")
|
||||||
|
|
||||||
-- Provides the Format, FormatWrite, FormatLock, and FormatWriteLock commands
|
-- Provides the Format, FormatWrite, FormatLock, and FormatWriteLock commands
|
||||||
require("formatter").setup {
|
require("formatter").setup({
|
||||||
-- Enable or disable logging
|
-- Enable or disable logging
|
||||||
logging = true,
|
logging = true,
|
||||||
log_level = vim.log.levels.WARN,
|
log_level = vim.log.levels.WARN,
|
||||||
|
@ -21,7 +21,7 @@ require("formatter").setup {
|
||||||
},
|
},
|
||||||
stdin = true,
|
stdin = true,
|
||||||
}
|
}
|
||||||
end
|
end,
|
||||||
},
|
},
|
||||||
nix = {
|
nix = {
|
||||||
require("formatter.filetypes.nix").alejandra,
|
require("formatter.filetypes.nix").alejandra,
|
||||||
|
@ -30,13 +30,18 @@ require("formatter").setup {
|
||||||
exe = "alejandra",
|
exe = "alejandra",
|
||||||
stdin = true,
|
stdin = true,
|
||||||
args = {
|
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()
|
local capabilities = require("cmp_nvim_lsp").default_capabilities()
|
||||||
|
|
||||||
-- funny lsp config stuff
|
-- funny lsp config stuff
|
||||||
require('lspconfig').nil_ls.setup({
|
require("lspconfig").nil_ls.setup({
|
||||||
on_attach = on_attach,
|
on_attach = on_attach,
|
||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
require("lspconfig").lua_ls.setup({
|
require("lspconfig").lua_ls.setup({
|
||||||
on_attach = on_attach,
|
on_attach = on_attach,
|
||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
|
@ -74,6 +73,6 @@ require("lspconfig").cssls.setup({
|
||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
})
|
})
|
||||||
|
|
||||||
require('lspconfig')['hls'].setup {
|
require("lspconfig")["hls"].setup({
|
||||||
filetypes = { 'haskell', 'lhaskell', 'cabal' },
|
filetypes = { "haskell", "lhaskell", "cabal" },
|
||||||
}
|
})
|
||||||
|
|
Loading…
Reference in a new issue