Skip to content
Discussion options

You must be logged in to vote

I believe you'll have to send a "notification" to the LSP server. You'll need to do something like this.

local client = vim.lsp.get_active_clients({name = 'solidity'})[1]

if client == nil then
  return
end

local defaults = client.config.settings

local lines = lines_from(file_name)
local remap_tab = get_tab(lines)

local new_settings = {
  solidity = {
    includePath = '',
    remapping = remap_tab
  }
}

local ok, err = pcall(client.notify, 'workspace/didChangeConfiguration', {
  settings = vim.tbl_deep_extend('force', defaults, new_settings) 
})

if not ok then
  print('Could not send settings')
end

For this to work your LSP server has to implement workspace/didChangeConfiguration.

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@0xDmtri
Comment options

@VonHeikemen
Comment options

Answer selected by 0xDmtri
@0xDmtri
Comment options

@0xDmtri
Comment options

@VonHeikemen
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants