mirror of
https://github.com/LunarVim/LunarVim.git
synced 2025-08-30 14:49:43 +02:00
update javascript
This commit is contained in:
parent
f5184ed9d0
commit
89fac34ca8
2 changed files with 7 additions and 13 deletions
2
ftplugin/javascript.vim
Normal file
2
ftplugin/javascript.vim
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
set ts=2
|
||||||
|
set sw=2
|
|
@ -31,25 +31,17 @@ local shellcheck = {
|
||||||
lintFormats = {'%f:%l:%c: %trror: %m', '%f:%l:%c: %tarning: %m', '%f:%l:%c: %tote: %m'}
|
lintFormats = {'%f:%l:%c: %trror: %m', '%f:%l:%c: %tarning: %m', '%f:%l:%c: %tote: %m'}
|
||||||
}
|
}
|
||||||
|
|
||||||
local shfmt = {
|
local shfmt = {formatCommand = 'shfmt -ci -s -bn', formatStdin = true}
|
||||||
formatCommand = 'shfmt -ci -s -bn',
|
|
||||||
formatStdin = true
|
|
||||||
}
|
|
||||||
|
|
||||||
local markdownlint = {
|
local markdownlint = {
|
||||||
-- TODO default to global lintrc
|
-- TODO default to global lintrc
|
||||||
-- lintcommand = 'markdownlint -s -c ./markdownlintrc',
|
-- lintcommand = 'markdownlint -s -c ./markdownlintrc',
|
||||||
lintCommand = 'markdownlint -s',
|
lintCommand = 'markdownlint -s',
|
||||||
lintStdin = true,
|
lintStdin = true,
|
||||||
lintFormats = { '%f:%l %m', '%f:%l:%c %m', '%f: %l: %m' }
|
lintFormats = {'%f:%l %m', '%f:%l:%c %m', '%f: %l: %m'}
|
||||||
}
|
}
|
||||||
|
|
||||||
local markdownPandocFormat = {
|
local markdownPandocFormat = {formatCommand = 'pandoc -f markdown -t gfm -sp --tab-stop=2', formatStdin = true}
|
||||||
formatCommand = 'pandoc -f markdown -t gfm -sp --tab-stop=2',
|
|
||||||
formatStdin = true
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
require"lspconfig".efm.setup {
|
require"lspconfig".efm.setup {
|
||||||
-- init_options = {initializationOptions},
|
-- init_options = {initializationOptions},
|
||||||
|
@ -63,14 +55,14 @@ require"lspconfig".efm.setup {
|
||||||
-- javascriptreact = {prettier, eslint},
|
-- javascriptreact = {prettier, eslint},
|
||||||
-- javascript = {prettier, eslint},
|
-- javascript = {prettier, eslint},
|
||||||
javascriptreact = {prettier},
|
javascriptreact = {prettier},
|
||||||
javascript = {prettier},
|
javascript = {prettier_global},
|
||||||
sh = {shellcheck, shfmt},
|
sh = {shellcheck, shfmt},
|
||||||
html = {prettier_global},
|
html = {prettier_global},
|
||||||
css = {prettier_global},
|
css = {prettier_global},
|
||||||
json = {prettier_global},
|
json = {prettier_global},
|
||||||
yaml = {prettier_global},
|
yaml = {prettier_global},
|
||||||
-- markdown = {markdownPandocFormat, markdownlint},
|
-- markdown = {markdownPandocFormat, markdownlint},
|
||||||
markdown = {markdownPandocFormat},
|
markdown = {markdownPandocFormat}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue