mirror of
https://github.com/LunarVim/LunarVim.git
synced 2025-07-21 11:14:42 +02:00
Default config reformat (#951)
This commit is contained in:
parent
7f11162bd8
commit
f95e150518
24 changed files with 233 additions and 313 deletions
|
@ -85,196 +85,8 @@ O = {
|
||||||
|
|
||||||
-- TODO move all of this into lang specific files, only require when using
|
-- TODO move all of this into lang specific files, only require when using
|
||||||
lang = {
|
lang = {
|
||||||
cmake = {
|
|
||||||
formatter = {
|
|
||||||
exe = "clang-format",
|
|
||||||
args = {},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
css = {
|
|
||||||
virtual_text = true,
|
|
||||||
formatter = {
|
|
||||||
exe = "prettier",
|
|
||||||
args = {},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
dart = {
|
|
||||||
sdk_path = "/usr/lib/dart/bin/snapshots/analysis_server.dart.snapshot",
|
|
||||||
formatter = {
|
|
||||||
exe = "dart",
|
|
||||||
args = { "format" },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
docker = {},
|
|
||||||
efm = {},
|
efm = {},
|
||||||
elm = {},
|
|
||||||
emmet = { active = false },
|
emmet = { active = false },
|
||||||
elixir = {
|
|
||||||
formatter = {
|
|
||||||
exe = "mix",
|
|
||||||
args = { "format" },
|
|
||||||
stdin = true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
graphql = {},
|
|
||||||
go = {
|
|
||||||
formatter = {
|
|
||||||
exe = "gofmt",
|
|
||||||
args = {},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
html = {},
|
|
||||||
java = {
|
|
||||||
java_tools = {
|
|
||||||
active = false,
|
|
||||||
},
|
|
||||||
formatter = {
|
|
||||||
exe = "prettier",
|
|
||||||
args = { "--stdin-filepath", vim.api.nvim_buf_get_name(0), "--single-quote" },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
json = {
|
|
||||||
diagnostics = {
|
|
||||||
virtual_text = { spacing = 0, prefix = "" },
|
|
||||||
signs = true,
|
|
||||||
underline = true,
|
|
||||||
},
|
|
||||||
formatter = {
|
|
||||||
exe = "python",
|
|
||||||
args = { "-m", "json.tool" },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
kotlin = {},
|
|
||||||
latex = {
|
|
||||||
filetypes = { "tex", "bib"},
|
|
||||||
aux_directory = nil,
|
|
||||||
bibtex_formatter = "texlab",
|
|
||||||
diagnostics_delay = 300,
|
|
||||||
formatter_line_length = 80,
|
|
||||||
latex_formatter = "latexindent",
|
|
||||||
build = {
|
|
||||||
executable = "latexmk",
|
|
||||||
args = {'-pdf', '-interaction=nonstopmode', '-synctex=1', '%f'},
|
|
||||||
on_save = false,
|
|
||||||
forward_search_after = false,
|
|
||||||
},
|
|
||||||
chktex = {
|
|
||||||
on_open_and_save = false,
|
|
||||||
on_edit = false,
|
|
||||||
},
|
|
||||||
forward_search = {
|
|
||||||
executable = nil,
|
|
||||||
args = {}
|
|
||||||
},
|
|
||||||
latexindent = {
|
|
||||||
["local"] = nil,
|
|
||||||
modify_line_breaks = false
|
|
||||||
},
|
|
||||||
diagnostics = {
|
|
||||||
virtual_text = {spacing = 0, prefix = ""},
|
|
||||||
signs = true,
|
|
||||||
underline = true,
|
|
||||||
},
|
|
||||||
auto_save = false,
|
|
||||||
ignore_errors = {},
|
|
||||||
},
|
|
||||||
lua = {
|
|
||||||
diagnostics = {
|
|
||||||
virtual_text = { spacing = 0, prefix = "" },
|
|
||||||
signs = true,
|
|
||||||
underline = true,
|
|
||||||
},
|
|
||||||
formatter = {
|
|
||||||
exe = "stylua",
|
|
||||||
args = {},
|
|
||||||
stdin = false,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
php = {
|
|
||||||
format = {
|
|
||||||
format = {
|
|
||||||
default = "psr12",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
environment = {
|
|
||||||
php_version = "7.4",
|
|
||||||
},
|
|
||||||
diagnostics = {
|
|
||||||
virtual_text = { spacing = 0, prefix = "" },
|
|
||||||
signs = true,
|
|
||||||
underline = true,
|
|
||||||
},
|
|
||||||
filetypes = { "php", "phtml" },
|
|
||||||
formatter = {
|
|
||||||
exe = "phpcbf",
|
|
||||||
args = { "--standard=PSR12", vim.api.nvim_buf_get_name(0) },
|
|
||||||
stdin = false,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
python = {
|
|
||||||
-- @usage can be flake8 or yapf
|
|
||||||
linter = "",
|
|
||||||
isort = false,
|
|
||||||
diagnostics = {
|
|
||||||
virtual_text = { spacing = 0, prefix = "" },
|
|
||||||
signs = true,
|
|
||||||
underline = true,
|
|
||||||
},
|
|
||||||
analysis = {
|
|
||||||
type_checking = "basic",
|
|
||||||
auto_search_paths = true,
|
|
||||||
use_library_code_types = true,
|
|
||||||
},
|
|
||||||
formatter = {
|
|
||||||
exe = "yapf",
|
|
||||||
args = {},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
ruby = {
|
|
||||||
diagnostics = {
|
|
||||||
virtualtext = { spacing = 0, prefix = "" },
|
|
||||||
signs = true,
|
|
||||||
underline = true,
|
|
||||||
},
|
|
||||||
filetypes = { "rb", "erb", "rakefile", "ruby" },
|
|
||||||
formatter = {
|
|
||||||
exe = "rufo",
|
|
||||||
args = { "-x" },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
rust = {
|
|
||||||
rust_tools = {
|
|
||||||
active = false,
|
|
||||||
parameter_hints_prefix = "<-",
|
|
||||||
other_hints_prefix = "=>", -- prefix for all the other hints (type, chaining)
|
|
||||||
},
|
|
||||||
-- @usage can be clippy
|
|
||||||
formatter = {
|
|
||||||
exe = "rustfmt",
|
|
||||||
args = { "--emit=stdout", "--edition=2018" },
|
|
||||||
},
|
|
||||||
linter = "",
|
|
||||||
diagnostics = {
|
|
||||||
virtual_text = { spacing = 0, prefix = "" },
|
|
||||||
signs = true,
|
|
||||||
underline = true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
sh = {
|
|
||||||
-- @usage can be 'shellcheck'
|
|
||||||
linter = "",
|
|
||||||
-- @usage can be 'shfmt'
|
|
||||||
diagnostics = {
|
|
||||||
virtual_text = { spacing = 0, prefix = "" },
|
|
||||||
signs = true,
|
|
||||||
underline = true,
|
|
||||||
},
|
|
||||||
formatter = {
|
|
||||||
exe = "shfmt",
|
|
||||||
args = { "-w" },
|
|
||||||
stdin = false,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
svelte = {},
|
svelte = {},
|
||||||
tailwindcss = {
|
tailwindcss = {
|
||||||
active = false,
|
active = false,
|
||||||
|
@ -288,13 +100,6 @@ O = {
|
||||||
"typescriptreact",
|
"typescriptreact",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
terraform = {
|
|
||||||
formatter = {
|
|
||||||
exe = "terraform",
|
|
||||||
args = { "fmt" },
|
|
||||||
stdin = false,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
tsserver = {
|
tsserver = {
|
||||||
-- @usage can be 'eslint' or 'eslint_d'
|
-- @usage can be 'eslint' or 'eslint_d'
|
||||||
linter = "",
|
linter = "",
|
||||||
|
@ -308,13 +113,6 @@ O = {
|
||||||
args = {},
|
args = {},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
vim = {},
|
|
||||||
yaml = {
|
|
||||||
formatter = {
|
|
||||||
exe = "prettier",
|
|
||||||
args = { "--stdin-filepath", vim.api.nvim_buf_get_name(0), "--single-quote" },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -330,3 +128,25 @@ require("core.treesitter").config()
|
||||||
require("core.which-key").config()
|
require("core.which-key").config()
|
||||||
|
|
||||||
require("lang.clang").config()
|
require("lang.clang").config()
|
||||||
|
require("lang.cmake").config()
|
||||||
|
require("lang.css").config()
|
||||||
|
require("lang.dart").config()
|
||||||
|
require("lang.dockerfile").config()
|
||||||
|
require("lang.elixir").config()
|
||||||
|
require("lang.elm").config()
|
||||||
|
require("lang.go").config()
|
||||||
|
require("lang.graphql").config()
|
||||||
|
require("lang.html").config()
|
||||||
|
require("lang.java").config()
|
||||||
|
require("lang.json").config()
|
||||||
|
require("lang.kotlin").config()
|
||||||
|
require("lang.lua").config()
|
||||||
|
require("lang.php").config()
|
||||||
|
require("lang.python").config()
|
||||||
|
require("lang.ruby").config()
|
||||||
|
require("lang.rust").config()
|
||||||
|
require("lang.sh").config()
|
||||||
|
require("lang.terraform").config()
|
||||||
|
require("lang.tex").config()
|
||||||
|
require("lang.vim").config()
|
||||||
|
require("lang.yaml").config()
|
||||||
|
|
|
@ -1,63 +0,0 @@
|
||||||
local M = {}
|
|
||||||
|
|
||||||
M.config = function()
|
|
||||||
-- TODO: implement config for language
|
|
||||||
return "No config available!"
|
|
||||||
end
|
|
||||||
|
|
||||||
M.format = function()
|
|
||||||
O.formatters.filetype["c"] = {
|
|
||||||
function()
|
|
||||||
return {
|
|
||||||
exe = O.lang.clang.formatter.exe,
|
|
||||||
args = O.lang.clang.formatter.args,
|
|
||||||
stdin = not (O.lang.clang.formatter.stdin ~= nil),
|
|
||||||
}
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
O.formatters.filetype["cpp"] = O.formatters.filetype["c"]
|
|
||||||
|
|
||||||
require("formatter.config").set_defaults {
|
|
||||||
logging = false,
|
|
||||||
filetype = O.formatters.filetype,
|
|
||||||
}
|
|
||||||
end
|
|
||||||
|
|
||||||
M.lint = function()
|
|
||||||
-- TODO: implement linters (if applicable)
|
|
||||||
return "No linters configured!"
|
|
||||||
end
|
|
||||||
|
|
||||||
M.lsp = function()
|
|
||||||
if require("lv-utils").check_lsp_client_active "clangd" then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
local clangd_flags = { "--background-index" }
|
|
||||||
|
|
||||||
if O.lang.clang.cross_file_rename then
|
|
||||||
table.insert(clangd_flags, "--cross-file-rename")
|
|
||||||
end
|
|
||||||
|
|
||||||
table.insert(clangd_flags, "--header-insertion=" .. O.lang.clang.header_insertion)
|
|
||||||
|
|
||||||
require("lspconfig").clangd.setup {
|
|
||||||
cmd = { DATA_PATH .. "/lspinstall/cpp/clangd/bin/clangd", unpack(clangd_flags) },
|
|
||||||
on_attach = require("lsp").common_on_attach,
|
|
||||||
handlers = {
|
|
||||||
["textDocument/publishDiagnostics"] = vim.lsp.with(vim.lsp.diagnostic.on_publish_diagnostics, {
|
|
||||||
virtual_text = O.lang.clang.diagnostics.virtual_text,
|
|
||||||
signs = O.lang.clang.diagnostics.signs,
|
|
||||||
underline = O.lang.clang.diagnostics.underline,
|
|
||||||
update_in_insert = true,
|
|
||||||
}),
|
|
||||||
},
|
|
||||||
}
|
|
||||||
end
|
|
||||||
|
|
||||||
M.dap = function()
|
|
||||||
-- TODO: implement dap
|
|
||||||
return "No DAP configured!"
|
|
||||||
end
|
|
||||||
|
|
||||||
return M
|
|
|
@ -1,8 +1,12 @@
|
||||||
local M = {}
|
local M = {}
|
||||||
|
|
||||||
M.config = function()
|
M.config = function()
|
||||||
-- TODO: implement config for language
|
O.lang.cmake = {
|
||||||
return "No config available!"
|
formatter = {
|
||||||
|
exe = "clang-format",
|
||||||
|
args = {},
|
||||||
|
},
|
||||||
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
M.format = function()
|
M.format = function()
|
||||||
|
|
|
@ -1,8 +1,13 @@
|
||||||
local M = {}
|
local M = {}
|
||||||
|
|
||||||
M.config = function()
|
M.config = function()
|
||||||
-- TODO: implement config for language
|
O.lang.css = {
|
||||||
return "No config available!"
|
virtual_text = true,
|
||||||
|
formatter = {
|
||||||
|
exe = "prettier",
|
||||||
|
args = {},
|
||||||
|
},
|
||||||
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
M.format = function()
|
M.format = function()
|
||||||
|
|
|
@ -1,8 +1,13 @@
|
||||||
local M = {}
|
local M = {}
|
||||||
|
|
||||||
M.config = function()
|
M.config = function()
|
||||||
-- TODO: implement config for language
|
O.lang.dart = {
|
||||||
return "No config available!"
|
sdk_path = "/usr/lib/dart/bin/snapshots/analysis_server.dart.snapshot",
|
||||||
|
formatter = {
|
||||||
|
exe = "dart",
|
||||||
|
args = { "format" },
|
||||||
|
},
|
||||||
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
M.format = function()
|
M.format = function()
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
local M = {}
|
local M = {}
|
||||||
|
|
||||||
M.config = function()
|
M.config = function()
|
||||||
-- TODO: implement config for language
|
O.lang.docker = {}
|
||||||
return "No config available!"
|
|
||||||
end
|
end
|
||||||
|
|
||||||
M.format = function()
|
M.format = function()
|
||||||
|
|
|
@ -1,8 +1,13 @@
|
||||||
local M = {}
|
local M = {}
|
||||||
|
|
||||||
M.config = function()
|
M.config = function()
|
||||||
-- TODO: implement config for language
|
O.lang.elixir = {
|
||||||
return "No config available!"
|
formatter = {
|
||||||
|
exe = "mix",
|
||||||
|
args = { "format" },
|
||||||
|
stdin = true,
|
||||||
|
},
|
||||||
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
M.format = function()
|
M.format = function()
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
local M = {}
|
local M = {}
|
||||||
|
|
||||||
M.config = function()
|
M.config = function()
|
||||||
-- TODO: implement config for language
|
O.lang.elm = {}
|
||||||
return "No config available!"
|
|
||||||
end
|
end
|
||||||
|
|
||||||
M.format = function()
|
M.format = function()
|
||||||
|
|
|
@ -1,6 +1,15 @@
|
||||||
local M = {}
|
local M = {}
|
||||||
|
|
||||||
M.config = function()
|
M.config = function()
|
||||||
|
O.lang.go = {
|
||||||
|
formatter = {
|
||||||
|
exe = "gofmt",
|
||||||
|
args = {},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
M.format = function()
|
||||||
O.formatters.filetype["go"] = {
|
O.formatters.filetype["go"] = {
|
||||||
function()
|
function()
|
||||||
return {
|
return {
|
||||||
|
@ -17,11 +26,6 @@ M.config = function()
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
M.format = function()
|
|
||||||
-- TODO: implement formatter for language
|
|
||||||
return "No formatter available!"
|
|
||||||
end
|
|
||||||
|
|
||||||
M.lint = function()
|
M.lint = function()
|
||||||
-- TODO: implement linters (if applicable)
|
-- TODO: implement linters (if applicable)
|
||||||
return "No linters configured!"
|
return "No linters configured!"
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
local M = {}
|
local M = {}
|
||||||
|
|
||||||
M.config = function()
|
M.config = function()
|
||||||
-- TODO: implement config for language
|
O.lang.graphql = {}
|
||||||
return "No config available!"
|
|
||||||
end
|
end
|
||||||
|
|
||||||
M.format = function()
|
M.format = function()
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
local M = {}
|
local M = {}
|
||||||
|
|
||||||
M.config = function()
|
M.config = function()
|
||||||
-- TODO: implement config for language
|
O.lang.html = {}
|
||||||
return "No config available!"
|
|
||||||
end
|
end
|
||||||
|
|
||||||
M.format = function()
|
M.format = function()
|
||||||
|
|
|
@ -1,8 +1,15 @@
|
||||||
local M = {}
|
local M = {}
|
||||||
|
|
||||||
M.config = function()
|
M.config = function()
|
||||||
-- TODO: implement config for language
|
O.lang.java = {
|
||||||
return "No config available!"
|
java_tools = {
|
||||||
|
active = false,
|
||||||
|
},
|
||||||
|
formatter = {
|
||||||
|
exe = "prettier",
|
||||||
|
args = { "--stdin-filepath", vim.api.nvim_buf_get_name(0), "--single-quote" },
|
||||||
|
},
|
||||||
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
M.format = function()
|
M.format = function()
|
||||||
|
|
|
@ -1,8 +1,17 @@
|
||||||
local M = {}
|
local M = {}
|
||||||
|
|
||||||
M.config = function()
|
M.config = function()
|
||||||
-- TODO: implement config for language
|
O.lang.json = {
|
||||||
return "No config available!"
|
diagnostics = {
|
||||||
|
virtual_text = { spacing = 0, prefix = "" },
|
||||||
|
signs = true,
|
||||||
|
underline = true,
|
||||||
|
},
|
||||||
|
formatter = {
|
||||||
|
exe = "python",
|
||||||
|
args = { "-m", "json.tool" },
|
||||||
|
},
|
||||||
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
M.format = function()
|
M.format = function()
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
local M = {}
|
local M = {}
|
||||||
|
|
||||||
M.config = function()
|
M.config = function()
|
||||||
-- TODO: implement config for language
|
O.lang.kotlin = {}
|
||||||
return "No config available!"
|
|
||||||
end
|
end
|
||||||
|
|
||||||
M.format = function()
|
M.format = function()
|
||||||
|
|
|
@ -1,8 +1,18 @@
|
||||||
local M = {}
|
local M = {}
|
||||||
|
|
||||||
M.config = function()
|
M.config = function()
|
||||||
-- TODO: implement config for language
|
O.lang.lua = {
|
||||||
return "No config available!"
|
diagnostics = {
|
||||||
|
virtual_text = { spacing = 0, prefix = "" },
|
||||||
|
signs = true,
|
||||||
|
underline = true,
|
||||||
|
},
|
||||||
|
formatter = {
|
||||||
|
exe = "stylua",
|
||||||
|
args = {},
|
||||||
|
stdin = false,
|
||||||
|
},
|
||||||
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
M.format = function()
|
M.format = function()
|
||||||
|
|
|
@ -1,8 +1,27 @@
|
||||||
local M = {}
|
local M = {}
|
||||||
|
|
||||||
M.config = function()
|
M.config = function()
|
||||||
-- TODO: implement config for language
|
O.lang.php = {
|
||||||
return "No config available!"
|
format = {
|
||||||
|
format = {
|
||||||
|
default = "psr12",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
environment = {
|
||||||
|
php_version = "7.4",
|
||||||
|
},
|
||||||
|
diagnostics = {
|
||||||
|
virtual_text = { spacing = 0, prefix = "" },
|
||||||
|
signs = true,
|
||||||
|
underline = true,
|
||||||
|
},
|
||||||
|
filetypes = { "php", "phtml" },
|
||||||
|
formatter = {
|
||||||
|
exe = "phpcbf",
|
||||||
|
args = { "--standard=PSR12", vim.api.nvim_buf_get_name(0) },
|
||||||
|
stdin = false,
|
||||||
|
},
|
||||||
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
M.format = function()
|
M.format = function()
|
||||||
|
|
|
@ -1,5 +1,27 @@
|
||||||
local M = {}
|
local M = {}
|
||||||
|
|
||||||
|
M.config = function()
|
||||||
|
O.lang.python = {
|
||||||
|
-- @usage can be flake8 or yapf
|
||||||
|
linter = "",
|
||||||
|
isort = false,
|
||||||
|
diagnostics = {
|
||||||
|
virtual_text = { spacing = 0, prefix = "" },
|
||||||
|
signs = true,
|
||||||
|
underline = true,
|
||||||
|
},
|
||||||
|
analysis = {
|
||||||
|
type_checking = "basic",
|
||||||
|
auto_search_paths = true,
|
||||||
|
use_library_code_types = true,
|
||||||
|
},
|
||||||
|
formatter = {
|
||||||
|
exe = "yapf",
|
||||||
|
args = {},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
M.format = function()
|
M.format = function()
|
||||||
O.formatters.filetype["python"] = {
|
O.formatters.filetype["python"] = {
|
||||||
function()
|
function()
|
||||||
|
|
|
@ -1,8 +1,18 @@
|
||||||
local M = {}
|
local M = {}
|
||||||
|
|
||||||
M.config = function()
|
M.config = function()
|
||||||
-- TODO: implement config for language
|
O.lang.ruby = {
|
||||||
return "No config available!"
|
diagnostics = {
|
||||||
|
virtualtext = { spacing = 0, prefix = "" },
|
||||||
|
signs = true,
|
||||||
|
underline = true,
|
||||||
|
},
|
||||||
|
filetypes = { "rb", "erb", "rakefile", "ruby" },
|
||||||
|
formatter = {
|
||||||
|
exe = "rufo",
|
||||||
|
args = { "-x" },
|
||||||
|
},
|
||||||
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
M.format = function()
|
M.format = function()
|
||||||
|
|
|
@ -1,8 +1,24 @@
|
||||||
local M = {}
|
local M = {}
|
||||||
|
|
||||||
M.config = function()
|
M.config = function()
|
||||||
-- TODO: implement config for language
|
O.lang.rust = {
|
||||||
return "No config available!"
|
rust_tools = {
|
||||||
|
active = false,
|
||||||
|
parameter_hints_prefix = "<-",
|
||||||
|
other_hints_prefix = "=>", -- prefix for all the other hints (type, chaining)
|
||||||
|
},
|
||||||
|
-- @usage can be clippy
|
||||||
|
formatter = {
|
||||||
|
exe = "rustfmt",
|
||||||
|
args = { "--emit=stdout", "--edition=2018" },
|
||||||
|
},
|
||||||
|
linter = "",
|
||||||
|
diagnostics = {
|
||||||
|
virtual_text = { spacing = 0, prefix = "" },
|
||||||
|
signs = true,
|
||||||
|
underline = true,
|
||||||
|
},
|
||||||
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
M.format = function()
|
M.format = function()
|
||||||
|
|
|
@ -1,8 +1,21 @@
|
||||||
local M = {}
|
local M = {}
|
||||||
|
|
||||||
M.config = function()
|
M.config = function()
|
||||||
-- TODO: implement config for language
|
O.lang.sh = {
|
||||||
return "No config available!"
|
-- @usage can be 'shellcheck'
|
||||||
|
linter = "",
|
||||||
|
-- @usage can be 'shfmt'
|
||||||
|
diagnostics = {
|
||||||
|
virtual_text = { spacing = 0, prefix = "" },
|
||||||
|
signs = true,
|
||||||
|
underline = true,
|
||||||
|
},
|
||||||
|
formatter = {
|
||||||
|
exe = "shfmt",
|
||||||
|
args = { "-w" },
|
||||||
|
stdin = false,
|
||||||
|
},
|
||||||
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
M.format = function()
|
M.format = function()
|
||||||
|
|
|
@ -1,8 +1,13 @@
|
||||||
local M = {}
|
local M = {}
|
||||||
|
|
||||||
M.config = function()
|
M.config = function()
|
||||||
-- TODO: implement config for language
|
O.lang.terraform = {
|
||||||
return "No config available!"
|
formatter = {
|
||||||
|
exe = "terraform",
|
||||||
|
args = { "fmt" },
|
||||||
|
stdin = false,
|
||||||
|
},
|
||||||
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
M.format = function()
|
M.format = function()
|
||||||
|
|
|
@ -1,8 +1,39 @@
|
||||||
local M = {}
|
local M = {}
|
||||||
|
|
||||||
M.config = function()
|
M.config = function()
|
||||||
-- TODO: implement config for language
|
O.lang.latex = {
|
||||||
return "No config available!"
|
filetypes = { "tex", "bib" },
|
||||||
|
aux_directory = nil,
|
||||||
|
bibtex_formatter = "texlab",
|
||||||
|
diagnostics_delay = 300,
|
||||||
|
formatter_line_length = 80,
|
||||||
|
latex_formatter = "latexindent",
|
||||||
|
build = {
|
||||||
|
executable = "latexmk",
|
||||||
|
args = { "-pdf", "-interaction=nonstopmode", "-synctex=1", "%f" },
|
||||||
|
on_save = false,
|
||||||
|
forward_search_after = false,
|
||||||
|
},
|
||||||
|
chktex = {
|
||||||
|
on_open_and_save = false,
|
||||||
|
on_edit = false,
|
||||||
|
},
|
||||||
|
forward_search = {
|
||||||
|
executable = nil,
|
||||||
|
args = {},
|
||||||
|
},
|
||||||
|
latexindent = {
|
||||||
|
["local"] = nil,
|
||||||
|
modify_line_breaks = false,
|
||||||
|
},
|
||||||
|
diagnostics = {
|
||||||
|
virtual_text = { spacing = 0, prefix = "" },
|
||||||
|
signs = true,
|
||||||
|
underline = true,
|
||||||
|
},
|
||||||
|
auto_save = false,
|
||||||
|
ignore_errors = {},
|
||||||
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
M.format = function()
|
M.format = function()
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
local M = {}
|
local M = {}
|
||||||
|
|
||||||
M.config = function()
|
M.config = function()
|
||||||
-- TODO: implement config for language
|
O.lang.vim = {}
|
||||||
return "No config available!"
|
|
||||||
end
|
end
|
||||||
|
|
||||||
M.format = function()
|
M.format = function()
|
||||||
|
|
|
@ -1,6 +1,15 @@
|
||||||
local M = {}
|
local M = {}
|
||||||
|
|
||||||
M.config = function()
|
M.config = function()
|
||||||
|
O.lang.yaml = {
|
||||||
|
formatter = {
|
||||||
|
exe = "prettier",
|
||||||
|
args = { "--stdin-filepath", vim.api.nvim_buf_get_name(0), "--single-quote" },
|
||||||
|
},
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
M.format = function()
|
||||||
O.formatters.filetype["yaml"] = {
|
O.formatters.filetype["yaml"] = {
|
||||||
function()
|
function()
|
||||||
return {
|
return {
|
||||||
|
@ -16,11 +25,6 @@ M.config = function()
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
M.format = function()
|
|
||||||
-- TODO: implement formatter for language
|
|
||||||
return "No formatter available!"
|
|
||||||
end
|
|
||||||
|
|
||||||
M.lint = function()
|
M.lint = function()
|
||||||
-- TODO: implement linters (if applicable)
|
-- TODO: implement linters (if applicable)
|
||||||
return "No linters configured!"
|
return "No linters configured!"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue