Skip to content
jinzhongjia edited this page Sep 25, 2023 · 7 revisions

For lua_ls

if you are use lua_ls, I recommand you use type_definition instead of definition, The reason is as follows:

We randomly list a piece of code

M.setup = function(config)
   -- ... do something
end

when you use definition, lua_ls will return you two positions, one is M.setup, another is function(config)

when you use type_definition, lua_ls will only return you one position, it is function(config)


Inlay Hint filter

you can choose the filetypes which enable inlay_hint,like this:

local LspUI = require("LspUI")

LspUI.setup({
    inlay_hint = {
        filter = {
            blacklist = { "zig" },
            -- you also can use white list
            -- whitelist = { "lua" }, 
        },
    },
})
Clone this wiki locally