diff --git a/README.md b/README.md index 8792e55..be4e276 100644 --- a/README.md +++ b/README.md @@ -192,8 +192,13 @@ require("xbase.statusline").feline() -- append to feline setup function --- Log level. Set it to ERROR to ignore everything log_level = vim.log.levels.DEBUG, --- Options to be passed to lspconfig.nvim's sourcekit setup function. - --- Usually empty map is sufficient, However, it is strongly recommended to use on_attach key to setup custom mapppings - sourcekit = {}, --- Set it to nil to skip lspconfig's sourcekit setup + --- Setting this to {} is sufficient, However, it is strongly recommended to use on_attach key to setup custom mappings + --- { + --- cmd = { "sourcekit-lsp", "--log-level", "error" }, + --- filetypes = { "swift" }, + --- root_dir = pattern("Package.swift", ".git", "project.yml", "Project.swift"), + --- } + sourcekit = nil, -- Disabled by default (xbase will not call it for you) --- Statusline provider configurations statusline = { watching = { icon = "", color = "#1abc9c" }, diff --git a/lua/xbase/config.lua b/lua/xbase/config.lua index 330b784..606c53e 100644 --- a/lua/xbase/config.lua +++ b/lua/xbase/config.lua @@ -10,8 +10,14 @@ local defaults = { --- Log level. Set to ERROR to ignore everything log_level = vim.log.levels.DEBUG, --- Options to be passed to lspconfig.nvim's sourcekit setup function. - --- Usually empty map is sufficient, However, it is strongly recommended to use on_attach key to setup custom mappings - sourcekit = {}, -- Set it to nil to skip lspconfig's sourcekit setup + --- Setting this to {} is sufficient, However, it is strongly recommended to use on_attach key to setup custom mappings. + --- Opts if set to {} will be: + --- { + --- cmd = { "sourcekit-lsp", "--log-level", "error" }, + --- filetypes = { "swift" }, + --- root_dir = pattern("Package.swift", ".git", "project.yml", "Project.swift"), + --- } + sourcekit = nil, -- Disabled by default --- Statusline provider configurations statusline = { watching = { icon = "", color = "#1abc9c" },