Skip to content

Instantly share code, notes, and snippets.

@zetashift
Created May 11, 2021 19:41
Show Gist options
  • Save zetashift/89f4de11f3ba2b422f8f28e26c92f7ff to your computer and use it in GitHub Desktop.
Save zetashift/89f4de11f3ba2b422f8f28e26c92f7ff to your computer and use it in GitHub Desktop.
Ltex-ls and NeoVim
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