Closed mawkler closed 5 months ago
config
is received via initializationOptions so it goes in init_options, eg:
require('lspconfig').typos_lsp.setup({
init_options = {
config = '/custom/path/.typos.toml',
}
})
However, it looks like there's an edge case! When Neovim doesn't initialise typo_lsp with workspaceFolders
(ie: workspaceFolders = vim.NIL
) the config file is ignored 😱 This is something that typos-lsp should handle, so I'll look into making a fix.
PS: It looks like workspaceFolders
is derived from root_dir by default (ie: when not explicitly set). However, if workspaceFolders
is not explicitly set, and root_dir is nil (because it doesn't contain any of these files) then we end up with rootPath = vim.NIL, rootUri = vim.NIL, workspaceFolders = vim.NIL
and therefore an ignored config file 😞
Interesting, thanks for looking into it!
@tekumara Is the v0.1.12 release supposed to show up under releases? It still seems to show v0.1.11 as the latest version 🤔
Unfortunately there's a 32-bit windows build error I haven't managed to fix yet blocking the release 😞
Fixed and v0.1.12 has been released, let me know how you go 🤞
@tekumara Yes, my issue has been fixed! Thank you very much!
I'm trying to explicitly set the typos config using
typos.config
. However, it doesn't seem to get picked up. I've tried specifying the config value in all kinds of ways, but none of them seems to work:What am I doing wrong?