Skip to content

How to configure LSP servers installed with mason? #92

Answered by Orlinky
Orlinky asked this question in Q&A
Discussion options

You must be logged in to vote

After taking a break and reading this question I found my answer:

["sumneko_lua"] = function()
    require("lspconfig").sumneko_lua.setup({
      on_attach = opts.on_attach,
      capabilities = opts.capabilities,

      settings = {
        Lua = {
          diagnostics = {
            globals = { "vim" },
          },

          workspace = {
            library = {
              [vim.fn.expand("$VIMRUNTIME/lua")] = true,
              [vim.fn.stdpath("config") .. "/lua"] = true,
            },
          },
        },
      },
    })

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@punowo
Comment options

@Orlinky
Comment options

Answer selected by Orlinky
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