Closed ahmedelgabri closed 4 years ago
@ahmedelgabri Would you show me vim-lsp.log around initialize.
@h-michael I tried a yaml file & a json file & this is the only thing I got in a clean log file.
[ ERROR ] 2020-05-10T09:31:43Z+0200 ] ...EAD-ef0398f/share/nvim/runtime/lua/vim/lsp/callbacks.lua:184 ] "Notification handler 'workspace/didChangeConfiguration' failed with message: jsonConfigurationSettings.forEach is not a function"
@ahmedelgabri You should change settings like this.
require'nvim_lsp'.jsonls.setup{
settings = {
json = {
schemas = {
{
description = 'TypeScript compiler configuration file',
fileMatch = {'tsconfig.json', 'tsconfig.*.json'},
url = 'http://json.schemastore.org/tsconfig'
},
{
description = 'Lerna config',
fileMatch = {'lerna.json'},
url = 'http://json.schemastore.org/lerna'
},
{
description = 'Babel configuration',
fileMatch = {'.babelrc.json', '.babelrc', 'babel.config.json'},
url = 'http://json.schemastore.org/lerna'
},
{
description = 'ESLint config',
fileMatch = {'.eslintrc.json', '.eslintrc'},
url = 'http://json.schemastore.org/eslintrc'
},
{
description = 'Bucklescript config',
fileMatch = {'bsconfig.json'},
url = 'https://bucklescript.github.io/bucklescript/docson/build-schema.json'
},
{
description = 'Prettier config',
fileMatch = {'.prettierrc', '.prettierrc.json', 'prettier.config.json'},
url = 'http://json.schemastore.org/prettierrc'
},
{
description = 'Vercel Now config',
fileMatch = {'now.json'},
url = 'http://json.schemastore.org/now'
},
{
description = 'Stylelint config',
fileMatch = {'.stylelintrc', '.stylelintrc.json', 'stylelint.config.json'},
url = 'http://json.schemastore.org/stylelintrc'
},
}
},
}
}
And I don't have any errors with yaml-language-server.
@h-michael this works, thanks! For yaml
, I don't know not getting errors too. So I will close the issue for now & if I get anything will post again. Thank you
I'm trying to migrate from
coc
& I have a couple of schemas for yaml & json but when I tried to migrate them, they don't look like they are being picked up.