Seems like _schemas_dir is empty reason being the string.match function is returning nil due to Windows-Unix different slash notation.
local _schemas_dir = script_abspath():match('(.*)/lua/nlspsettings/jsonls.lua$') .. '/schemas'
The following seems to work as a temporary solution (I can't really think of another way using regex as I am really bad with it :/)
local _schemas_dir
if vim.fn.has('win32') == 1 then
_schemas_dir = script_abspath():match('(.*)\\lua\\nlspsettings\\jsonls.lua$') .. '\\schemas'
else
_schemas_dir = script_abspath():match('(.*)/lua/nlspsettings/jsonls.lua$') .. '/schemas'
end
Other than that, thanks for the plugin!
I really hope at some point this will be able to support C-family languages (C, Cpp with clang)!
Following the configuration found in the README "usage" section, neovim on OS:Windows doesn't seem to be too happy about it.
The error is thrown upon calling this very line in the jsonls configuration:
Seems like
_schemas_dir
is empty reason being thestring.match
function is returning nil due to Windows-Unix different slash notation.The following seems to work as a temporary solution (I can't really think of another way using regex as I am really bad with it :/)
Other than that, thanks for the plugin! I really hope at some point this will be able to support C-family languages (C, Cpp with clang)!