Layers.lsp

layers.lsp #


methods #


M.packages #


function M.packages() ->  ("neovim/nvim-lspconfig",table,table,table,"nvim-lua/plenary.nvim",table,table)

M.preload #


function M.preload() ->  nil

M.load #


function M.load() ->  nil

M.use_server #


function M.use_server(
  lang: string,
  install: boolean,
  srv: string,
  settings: (table|nil)
) ->  nil

@param lang - The name of the language (used by Mason)

@param install - True if the server should be installed via Mason

@param srv - The name of the server executable (if any)

@param settings - Any optional settings for the language server

Enables an LSP server at startup

M.on_attach #


function M.on_attach(fn: function) ->  nil

@param fn - The callback function

Adds an on_attach function which gets called when LSPs get enabled on buffers

M.on_attach_one_time #


function M.on_attach_one_time(fn: function) ->  nil

@param fn - The callback function

Adds a one-time on_attach function which gets called the first time a LS is enabled on each buffer

M.get_callbacks #


function M.get_callbacks() -> callbacks function[]

@return callbacks - A list of callbacks

Returns the list of on_attach callbacks

M.get_callbacks_one_time #


function M.get_callbacks_one_time() ->  any

Returns the list of one-time on_attach callbacks

M.on_capabilities #


function M.on_capabilities(fn: function) ->  nil

@param fn - The hook

Sets the capabilities table

M.get_capabilities #


function M.get_capabilities() -> capabilities function

@return capabilities - The capabilities handler

Returns the current capabilities handler

fields #


M.servers #


M.servers: table

M.callbacks #


M.callbacks: table

M.one_time_callbacks #


M.one_time_callbacks: table

M.buffers #


M.buffers: table

The set of IDs of buffers that have had an LSP attached to them at least once. Closed buffers can also be in it.

M.capabilities #


M.capabilities : nil

M.use_nullls #


M.use_nullls: false

M.default_config #


M.default_config: {
    install: boolean = true,
    progress: table,
    mason: { registries = ("github:mason-org/mason-registry","github:visimp/mason-registry"), ... },
    mason_tool_installer: table,
    nullls: table,
    binds: table,
}