-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
jsonls_append_default_schemas
does not seem to work
#15
Comments
Thank you for creating the issue.
As you said, it is possible to work that way. Using the following minvimrcset encoding=utf-8
filetype plugin indent on
if has('vim_starting')
let s:pluin_manager_dir='~/.config/nvim/.plugged/vim-plug'
execute 'set runtimepath+=' . s:pluin_manager_dir
endif
call plug#begin('~/.config/nvim/.plugged')
Plug 'neovim/nvim-lspconfig'
Plug 'williamboman/nvim-lsp-installer'
Plug 'tamago324/nlsp-settings.nvim'
call plug#end()
set nobackup
set nowritebackup
set noswapfile
set updatecount=0
set backspace=indent,eol,start
language messages en_US.utf8
lua << EOF
local lsp_installer = require'nvim-lsp-installer'
local lspconfig = require("lspconfig")
local nlspsettings = require("nlspsettings")
vim.lsp.set_log_level(vim.log.levels.DEBUG)
nlspsettings.setup({
config_home = vim.fn.stdpath('config') .. '/nlsp-settings',
local_settings_root_markers = { '.git' },
jsonls_append_default_schemas = true
})
function on_attach(client, bufnr)
local function buf_set_option(...) vim.api.nvim_buf_set_option(bufnr, ...) end
buf_set_option('omnifunc', 'v:lua.vim.lsp.omnifunc')
end
local global_capabilities = vim.lsp.protocol.make_client_capabilities()
global_capabilities.textDocument.completion.completionItem.snippetSupport = true
lspconfig.util.default_config = vim.tbl_extend("force", lspconfig.util.default_config, {
capabilities = global_capabilities,
})
lsp_installer.on_server_ready(function(server)
server:setup({
on_attach = on_attach
})
end)
EOF |
Thanks for the answer. Unfortunately I could not make it work using this
Maybe I'm missing something? |
Thanks for the reply. Can you delete the To check the lsp.log, please change minvimrc to the following and run it again. minvimrcset encoding=utf-8
filetype plugin indent on
if has('vim_starting')
let s:pluin_manager_dir='~/.config/nvim/.plugged/vim-plug'
execute 'set runtimepath+=' . s:pluin_manager_dir
endif
call plug#begin('~/.config/nvim/.plugged')
Plug 'neovim/nvim-lspconfig'
Plug 'williamboman/nvim-lsp-installer'
Plug 'tamago324/nlsp-settings.nvim'
call plug#end()
set nobackup
set nowritebackup
set noswapfile
set updatecount=0
set backspace=indent,eol,start
language messages en_US.utf8
lua << EOF
local lsp_installer = require'nvim-lsp-installer'
local lspconfig = require("lspconfig")
local nlspsettings = require("nlspsettings")
vim.lsp.set_log_level(vim.log.levels.DEBUG)
nlspsettings.setup({
config_home = vim.fn.stdpath('config') .. '/nlsp-settings',
local_settings_root_markers = { '.git' },
jsonls_append_default_schemas = true
})
function on_attach(client, bufnr)
local function buf_set_option(...) vim.api.nvim_buf_set_option(bufnr, ...) end
buf_set_option('omnifunc', 'v:lua.vim.lsp.omnifunc')
end
local global_capabilities = vim.lsp.protocol.make_client_capabilities()
global_capabilities.textDocument.completion.completionItem.snippetSupport = true
lspconfig.util.default_config = vim.tbl_extend("force", lspconfig.util.default_config, {
capabilities = global_capabilities,
})
lsp_installer.on_server_ready(function(server)
server:setup({
on_attach = on_attach
})
end)
EOF |
This is
|
Thank you for posting the log.
I don't know why.
At this time, could you please set it up as in the first comment? |
Hello @tamago324, unfortunately after fighting with the code I could not make the
|
I don't know why, but it reproduced on I reproduced it in |
@aleprovencio I fixed it, please update and try it when you have time. |
Hello @tamago324, |
Hi @aleprovencio . {
| // cursor here and press `<C-x><C-o>`
} minvimrcset encoding=utf-8
filetype plugin indent on
if has('vim_starting')
let s:pluin_manager_dir='~/.config/nvim/.plugged/vim-plug'
execute 'set runtimepath+=' . s:pluin_manager_dir
endif
call plug#begin('~/.config/nvim/.plugged')
Plug 'neovim/nvim-lspconfig'
Plug 'williamboman/nvim-lsp-installer'
Plug '~/ghq/github.com/tamago324/nlsp-settings.nvim'
call plug#end()
set nobackup
set nowritebackup
set noswapfile
set updatecount=0
set backspace=indent,eol,start
language messages en_US.utf8
lua << EOF
local lsp_installer = require'nvim-lsp-installer'
local lspconfig = require("lspconfig")
local nlspsettings = require("nlspsettings")
vim.lsp.set_log_level(vim.log.levels.DEBUG)
nlspsettings.setup({
config_home = vim.fn.stdpath('config') .. '/nlsp-settings',
local_settings_root_markers = { '.git' },
append_default_schemas = true,
loader = "json"
})
function on_attach(client, bufnr)
local function buf_set_option(...) vim.api.nvim_buf_set_option(bufnr, ...) end
buf_set_option('omnifunc', 'v:lua.vim.lsp.omnifunc')
end
local global_capabilities = vim.lsp.protocol.make_client_capabilities()
global_capabilities.textDocument.completion.completionItem.snippetSupport = true
lspconfig.util.default_config = vim.tbl_extend("force", lspconfig.util.default_config, {
capabilities = global_capabilities,
})
lsp_installer.on_server_ready(function(server)
server:setup({
on_attach = on_attach
})
end)
EOF |
You've nailed @tamago324! I just had to correct the address of nlsp-settings on Plug's call, and it worked fine. Thanks for the effort on this issue and also for this useful plugin. |
Thank you for confirming! I was able to fix it thanks to your report. If you have any further questions, please let us know. |
I seemingly ran into the same issue. I'm not sure if my observation is correct but if it is perhaps the README and/or the Vim docs could clarify this behavior? |
Hello, I can get the completions to work if I manually do something like:
However, by omitting this snippet and setting
jsonls_append_default_schemas
astrue
does not work, shouldn't it alone be enough?The text was updated successfully, but these errors were encountered: