Created
May 11, 2021 19:41
-
-
Save zetashift/89f4de11f3ba2b422f8f28e26c92f7ff to your computer and use it in GitHub Desktop.
Ltex-ls and NeoVim
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local lspconfig = require'lspconfig' | |
local configs = require'lspconfig/configs' | |
local M = {} | |
M.setup = function() | |
-- Check if it's already defined for when reloading this file | |
if not lspconfig.ltex_ls then | |
configs.ltex_ls = { | |
default_config = { | |
cmd = { "/path/to/ltex-ls" }; | |
filetypes = { "markdown", "org", "latex" }; | |
root_dir = function(fname) | |
return lspconfig.util.find_git_ancestor(fname) or vim.loop.os_homedir() | |
end; | |
settings = {}; | |
}; | |
} | |
end | |
lspconfig.ltex_ls.setup({}) | |
end | |
return M |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment