Skip to content

where is the on_server_ready? #40

Answered by williamboman
nyngwang asked this question in Q&A
Discussion options

You must be logged in to vote

Hello! The on_server_ready function was deprecated a while back, mostly due to how it wrapped lspconfig and was causing confusion. There is a similar alternative in the mason-lspconfig extension (to be documented), try this:

require("mason").setup()
require("mason-lspconfig").setup()

-- the above is enough, but if you want to replicate the "on_server_ready" behaviour
-- where your installed servers are setup "automatically" you can do the following
require("mason-lspconfig").setup_handlers {
    -- default handler - setup with default settings
    function (server_name)
        lspconfig[server_name].setup {}
    end,
   -- you can override the default handler by providing custom handler…

Replies: 1 comment 8 replies

Comment options

You must be logged in to vote
8 replies
@williamboman
Comment options

@punowo
Comment options

@williamboman
Comment options

@punowo
Comment options

@nyngwang
Comment options

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