:P
This commit is contained in:
parent
ff1a24cb4e
commit
fd049db7a8
3 changed files with 0 additions and 52 deletions
|
@ -1,48 +0,0 @@
|
|||
-- Utilities for creating configurations
|
||||
local util = require("formatter.util")
|
||||
|
||||
-- Provides the Format, FormatWrite, FormatLock, and FormatWriteLock commands
|
||||
require("formatter").setup({
|
||||
-- Enable or disable logging
|
||||
logging = true,
|
||||
log_level = vim.log.levels.WARN,
|
||||
filetype = {
|
||||
lua = {
|
||||
require("formatter.filetypes.lua").stylua,
|
||||
function()
|
||||
return {
|
||||
exe = "stylua",
|
||||
args = {
|
||||
"--search-parent-directories",
|
||||
"--stdin-filepath",
|
||||
util.escape_path(util.get_current_buffer_file_path()),
|
||||
"--",
|
||||
"-",
|
||||
},
|
||||
stdin = true,
|
||||
}
|
||||
end,
|
||||
},
|
||||
nix = {
|
||||
require("formatter.filetypes.nix").alejandra,
|
||||
function()
|
||||
return {
|
||||
exe = "alejandra",
|
||||
stdin = true,
|
||||
args = {
|
||||
"--quiet",
|
||||
},
|
||||
}
|
||||
end,
|
||||
},
|
||||
["*"] = {
|
||||
require("formatter.filetypes.any").remove_trailing_whitespace,
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd({ "BufWritePost" }, {
|
||||
callback = function()
|
||||
vim.api.nvim_command("FormatWrite")
|
||||
end,
|
||||
})
|
|
@ -10,4 +10,3 @@ require("core.plugin_config.precense")
|
|||
require("core.plugin_config.colorscheme")
|
||||
require("core.plugin_config.liveserver")
|
||||
require("core.plugin_config.color-picker")
|
||||
require("core.plugin_config.formatter")
|
||||
|
|
|
@ -50,9 +50,6 @@ local plugins = {
|
|||
"hrsh7th/cmp-nvim-lsp",
|
||||
"onsails/lspkind.nvim",
|
||||
|
||||
-- formatting
|
||||
"mhartington/formatter.nvim",
|
||||
|
||||
-- snippet
|
||||
"L3MON4D3/LuaSnip",
|
||||
"saadparwaiz1/cmp_luasnip",
|
||||
|
|
Loading…
Reference in a new issue