diff options
author | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2021-07-22 00:08:36 +0200 |
---|---|---|
committer | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2021-07-22 00:08:36 +0200 |
commit | b51f1ae28924a752258e7607fbc3210f9b18eaac (patch) | |
tree | 8c8c095528990b3f6eb499dbcca15e9720e636d1 /.config/nvim/lua/cfg/lsp/ts-fmt-lint.lua | |
parent | da936b0ed9ac4c171d3c7908e41af1875a82b08b (diff) |
Updates based on Chris's lunarvim
Diffstat (limited to '.config/nvim/lua/cfg/lsp/ts-fmt-lint.lua')
-rw-r--r-- | .config/nvim/lua/cfg/lsp/ts-fmt-lint.lua | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/.config/nvim/lua/cfg/lsp/ts-fmt-lint.lua b/.config/nvim/lua/cfg/lsp/ts-fmt-lint.lua deleted file mode 100644 index 36d4ca8..0000000 --- a/.config/nvim/lua/cfg/lsp/ts-fmt-lint.lua +++ /dev/null @@ -1,37 +0,0 @@ --- Example configuations here: https://github.com/mattn/efm-langserver --- You can look for project scope Prettier and Eslint with e.g. vim.fn.glob("node_modules/.bin/prettier") etc. If it is not found revert to global Prettier where needed. -local M = {} - -M.setup = function() - local tsserver_args = {} - - local prettier = { - formatCommand = "prettier --stdin-filepath ${INPUT}", - formatStdin = true - } - - if vim.fn.glob("node_modules/.bin/prettier") ~= "" then - prettier = { - formatCommand = "./node_modules/.bin/prettier --stdin-filepath ${INPUT}", - formatStdin = true - } - end - - require"lspconfig".efm.setup { - -- init_options = {initializationOptions}, - cmd = {DATA_PATH .. "/lspinstall/efm/efm-langserver"}, - init_options = {documentFormatting = true, codeAction = false}, - filetypes = {"html", "css", "yaml", "vue", "javascript", "javascriptreact", "typescript", "typescriptreact"}, - settings = { - rootMarkers = {".git/", "package.json"}, - languages = { - html = {prettier}, - css = {prettier}, - json = {prettier}, - yaml = {prettier} - } - } - } -end - -return M |