chore(nvim): add commented formatter.nvim config
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
78
dots/.config/nvim/after/plugin/formatter.nvim.lua
Normal file
78
dots/.config/nvim/after/plugin/formatter.nvim.lua
Normal file
@@ -0,0 +1,78 @@
|
|||||||
|
-- require("formatter").setup({
|
||||||
|
-- logging = true,
|
||||||
|
-- filetype = {
|
||||||
|
-- typescriptreact = {
|
||||||
|
-- -- prettier
|
||||||
|
-- function()
|
||||||
|
-- return {
|
||||||
|
-- exe = "prettier",
|
||||||
|
-- args = { "--stdin-filepath", vim.api.nvim_buf_get_name(0) },
|
||||||
|
-- stdin = true,
|
||||||
|
-- }
|
||||||
|
-- end,
|
||||||
|
-- },
|
||||||
|
-- typescript = {
|
||||||
|
-- -- prettier
|
||||||
|
-- function()
|
||||||
|
-- return {
|
||||||
|
-- exe = "prettier",
|
||||||
|
-- args = { "--stdin-filepath", vim.api.nvim_buf_get_name(0) },
|
||||||
|
-- stdin = true,
|
||||||
|
-- }
|
||||||
|
-- end,
|
||||||
|
-- -- linter
|
||||||
|
-- -- function()
|
||||||
|
-- -- return {
|
||||||
|
-- -- exe = "eslint",
|
||||||
|
-- -- args = {
|
||||||
|
-- -- "--stdin-filename",
|
||||||
|
-- -- vim.api.nvim_buf_get_name(0),
|
||||||
|
-- -- "--fix",
|
||||||
|
-- -- "--cache"
|
||||||
|
-- -- },
|
||||||
|
-- -- stdin = false
|
||||||
|
-- -- }
|
||||||
|
-- -- end
|
||||||
|
-- },
|
||||||
|
-- javascript = {
|
||||||
|
-- -- prettier
|
||||||
|
-- function()
|
||||||
|
-- return {
|
||||||
|
-- exe = "prettier",
|
||||||
|
-- args = { "--stdin-filepath", vim.api.nvim_buf_get_name(0) },
|
||||||
|
-- stdin = true,
|
||||||
|
-- }
|
||||||
|
-- end,
|
||||||
|
-- },
|
||||||
|
-- javascriptreact = {
|
||||||
|
-- -- prettier
|
||||||
|
-- function()
|
||||||
|
-- return {
|
||||||
|
-- exe = "prettier",
|
||||||
|
-- args = { "--stdin-filepath", vim.api.nvim_buf_get_name(0) },
|
||||||
|
-- stdin = true,
|
||||||
|
-- }
|
||||||
|
-- end,
|
||||||
|
-- },
|
||||||
|
-- json = {
|
||||||
|
-- -- prettier
|
||||||
|
-- function()
|
||||||
|
-- return {
|
||||||
|
-- exe = "prettier",
|
||||||
|
-- args = { "--stdin-filepath", vim.api.nvim_buf_get_name(0) },
|
||||||
|
-- stdin = true,
|
||||||
|
-- }
|
||||||
|
-- end,
|
||||||
|
-- },
|
||||||
|
-- lua = {
|
||||||
|
-- -- luafmt
|
||||||
|
-- function()
|
||||||
|
-- return {
|
||||||
|
-- exe = "luafmt",
|
||||||
|
-- args = { "--indent-count", 2, "--stdin" },
|
||||||
|
-- stdin = true,
|
||||||
|
-- }
|
||||||
|
-- end,
|
||||||
|
-- },
|
||||||
|
-- },
|
||||||
|
-- })
|
||||||
Reference in New Issue
Block a user