diff options
Diffstat (limited to 'runtime/lua')
-rw-r--r-- | runtime/lua/vim/filetype.lua | 5 | ||||
-rw-r--r-- | runtime/lua/vim/lsp.lua | 16 |
2 files changed, 14 insertions, 7 deletions
diff --git a/runtime/lua/vim/filetype.lua b/runtime/lua/vim/filetype.lua index 83e82392de..6fa1684704 100644 --- a/runtime/lua/vim/filetype.lua +++ b/runtime/lua/vim/filetype.lua @@ -616,6 +616,7 @@ local extension = { janet = 'janet', jav = 'java', java = 'java', + jsh = 'java', jj = 'javacc', jjt = 'javacc', es = 'javascript', @@ -1438,6 +1439,7 @@ local filename = { ['/etc/asound.conf'] = 'alsaconf', ['build.xml'] = 'ant', ['.htaccess'] = 'apache', + APKBUILD = 'apkbuild', ['apt.conf'] = 'aptconf', ['/.aptitude/config'] = 'aptconf', ['=tagging-method'] = 'arch', @@ -1544,6 +1546,8 @@ local filename = { ['filter-rules'] = 'elmfilt', ['exim.conf'] = 'exim', exports = 'exports', + fennelrc = 'fennel', + ['.fennelrc'] = 'fennel', ['.fetchmailrc'] = 'fetchmail', fvSchemes = detect.foam, fvSolution = detect.foam, @@ -1795,7 +1799,6 @@ local filename = { ['.kshrc'] = detect.ksh, ['.profile'] = detect.sh, ['/etc/profile'] = detect.sh, - APKBUILD = detect.bash, PKGBUILD = detect.bash, ['.tcshrc'] = detect.tcsh, ['tcsh.login'] = detect.tcsh, diff --git a/runtime/lua/vim/lsp.lua b/runtime/lua/vim/lsp.lua index 5a93da4298..19d0377585 100644 --- a/runtime/lua/vim/lsp.lua +++ b/runtime/lua/vim/lsp.lua @@ -450,16 +450,20 @@ function lsp._resolve_config(name) if not econfig.resolved_config then -- Resolve configs from lsp/*.lua -- Calls to vim.lsp.config in lsp/* have a lower precedence than calls from other sites. - local orig_configs = lsp.config._configs - lsp.config._configs = {} - pcall(vim.cmd.runtime, { ('lsp/%s.lua'):format(name), bang = true }) - local rtp_configs = lsp.config._configs - lsp.config._configs = orig_configs + local rtp_config = {} ---@type vim.lsp.Config + for _, v in ipairs(api.nvim_get_runtime_file(('lsp/%s.lua'):format(name), true)) do + local config = assert(loadfile(v))() ---@type any? + if type(config) == 'table' then + rtp_config = vim.tbl_deep_extend('force', rtp_config, config) + else + log.warn(string.format('%s does not return a table, ignoring', v)) + end + end local config = vim.tbl_deep_extend( 'force', lsp.config._configs['*'] or {}, - rtp_configs[name] or {}, + rtp_config, lsp.config._configs[name] or {} ) |