diff options
Diffstat (limited to 'lua/lvim/config')
| -rw-r--r-- | lua/lvim/config/defaults.lua | 4 | ||||
| -rw-r--r-- | lua/lvim/config/init.lua | 127 | ||||
| -rw-r--r-- | lua/lvim/config/supported_languages.lua | 94 | 
3 files changed, 115 insertions, 110 deletions
diff --git a/lua/lvim/config/defaults.lua b/lua/lvim/config/defaults.lua index effe1e77..a20e34e1 100644 --- a/lua/lvim/config/defaults.lua +++ b/lua/lvim/config/defaults.lua @@ -28,7 +28,7 @@ return {          float_opts = {},        },      }, -    ---@usage set to false to restore the default behavior of vim.notify -    override_notify = true, +    -- currently disabled due to instabilities +    override_notify = false,    },  } 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) diff --git a/lua/lvim/config/supported_languages.lua b/lua/lvim/config/supported_languages.lua new file mode 100644 index 00000000..db28df12 --- /dev/null +++ b/lua/lvim/config/supported_languages.lua @@ -0,0 +1,94 @@ +return { +  "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", +}  | 
