diff options
author | kylo252 <[email protected]> | 2021-10-23 18:12:11 +0200 |
---|---|---|
committer | GitHub <[email protected]> | 2021-10-23 18:12:11 +0200 |
commit | 3dd60bd3d4165b14844a514d519f3810b8142a02 (patch) | |
tree | 613a08b92ea101349f27f0d268279257bcdb3543 /lua/lvim/config/init.lua | |
parent | 0ea08c7a1c1de5cb381351230d11513e287c42db (diff) |
fix(lsp): template generator now uses lsp.override (#1813)
Diffstat (limited to 'lua/lvim/config/init.lua')
-rw-r--r-- | lua/lvim/config/init.lua | 127 |
1 files changed, 19 insertions, 108 deletions
diff --git a/lua/lvim/config/init.lua b/lua/lvim/config/init.lua index c06d28ef..e89cb260 100644 --- a/lua/lvim/config/init.lua +++ b/lua/lvim/config/init.lua @@ -33,120 +33,31 @@ function M:init() local lvim_lsp_config = require "lvim.lsp.config" lvim.lsp = vim.deepcopy(lvim_lsp_config) - local supported_languages = { - "asm", - "bash", - "beancount", - "bibtex", - "bicep", - "c", - "c_sharp", - "clojure", - "cmake", - "comment", - "commonlisp", - "cpp", - "crystal", - "cs", - "css", - "cuda", - "d", - "dart", - "dockerfile", - "dot", - "elixir", - "elm", - "emmet", - "erlang", - "fennel", - "fish", - "fortran", - "gdscript", - "glimmer", - "go", - "gomod", - "graphql", - "haskell", - "hcl", - "heex", - "html", - "java", - "javascript", - "javascriptreact", - "jsdoc", - "json", - "json5", - "jsonc", - "julia", - "kotlin", - "latex", - "ledger", - "less", - "lua", - "markdown", - "nginx", - "nix", - "ocaml", - "ocaml_interface", - "perl", - "php", - "pioasm", - "ps1", - "puppet", - "python", - "ql", - "query", - "r", - "regex", - "rst", - "ruby", - "rust", - "scala", - "scss", - "sh", - "solidity", - "sparql", - "sql", - "supercollider", - "surface", - "svelte", - "swift", - "tailwindcss", - "terraform", - "tex", - "tlaplus", - "toml", - "tsx", - "turtle", - "typescript", - "typescriptreact", - "verilog", - "vim", - "vue", - "yaml", - "yang", - "zig", - } - + local supported_languages = require "lvim.config.supported_languages" require("lvim.lsp.manager").init_defaults(supported_languages) end -local function deprecation_notice() - local in_headless = #vim.api.nvim_list_uis() == 0 - if in_headless then - return +local function handle_deprecated_settings() + local function deprecation_notice(setting) + local in_headless = #vim.api.nvim_list_uis() == 0 + if in_headless then + return + end + + local msg = string.format( + "Deprecation notice: [%s] setting is no longer supported. See https://github.com/LunarVim/LunarVim#breaking-changes", + setting + ) + vim.schedule(function() + vim.notify(msg, vim.log.levels.WARN) + end) end + ---lvim.lang.FOO.lsp for lang, entry in pairs(lvim.lang) do - local deprecated_config = entry["lvim.lsp"] or {} + local deprecated_config = entry["lsp"] or {} if not vim.tbl_isempty(deprecated_config) then - local msg = string.format( - "Deprecation notice: [lvim.lang.%s.lsp] setting is no longer supported. See https://github.com/LunarVim/LunarVim#breaking-changes", - lang - ) - vim.schedule(function() - vim.notify(msg, vim.log.levels.WARN) - end) + deprecation_notice(string.format("lvim.lang.%s.lsp", lang)) end end end @@ -165,7 +76,7 @@ function M:load(config_path) end end - deprecation_notice() + handle_deprecated_settings() autocmds.define_augroups(lvim.autocommands) |