diff options
| author | William Boman <william@redwill.se> | 2021-11-27 15:58:00 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-11-27 09:58:00 -0500 |
| commit | d0263c11e53086242eea72cb76db9fecc6fbc449 (patch) | |
| tree | a99053ab3a4db8fee5e71b8e191763e9f6c20ede /lua | |
| parent | docs: update adding a new server example (#1499) (diff) | |
| download | nvim-lspconfig-d0263c11e53086242eea72cb76db9fecc6fbc449.tar nvim-lspconfig-d0263c11e53086242eea72cb76db9fecc6fbc449.tar.gz nvim-lspconfig-d0263c11e53086242eea72cb76db9fecc6fbc449.tar.bz2 nvim-lspconfig-d0263c11e53086242eea72cb76db9fecc6fbc449.tar.lz nvim-lspconfig-d0263c11e53086242eea72cb76db9fecc6fbc449.tar.xz nvim-lspconfig-d0263c11e53086242eea72cb76db9fecc6fbc449.tar.zst nvim-lspconfig-d0263c11e53086242eea72cb76db9fecc6fbc449.zip | |
chore: prefix all vim.notify message with [lspconfig] (#1496)
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/lspconfig.lua | 2 | ||||
| -rw-r--r-- | lua/lspconfig/configs.lua | 8 | ||||
| -rw-r--r-- | lua/lspconfig/server_configurations/eslint.lua | 4 | ||||
| -rw-r--r-- | lua/lspconfig/server_configurations/rust_analyzer.lua | 4 | ||||
| -rw-r--r-- | lua/lspconfig/server_configurations/vdmj.lua | 5 | ||||
| -rw-r--r-- | lua/lspconfig/util.lua | 5 |
6 files changed, 14 insertions, 14 deletions
diff --git a/lua/lspconfig.lua b/lua/lspconfig.lua index ee2711e9..8404632d 100644 --- a/lua/lspconfig.lua +++ b/lua/lspconfig.lua @@ -76,7 +76,7 @@ function mt:__index(k) else vim.notify( string.format( - 'Cannot access configuration for %s. Ensure this server is listed in ' + '[lspconfig] Cannot access configuration for %s. Ensure this server is listed in ' .. '`server_configurations.md` or added as a custom server.', k ), diff --git a/lua/lspconfig/configs.lua b/lua/lspconfig/configs.lua index 3ec4072b..56567013 100644 --- a/lua/lspconfig/configs.lua +++ b/lua/lspconfig/configs.lua @@ -104,7 +104,9 @@ function configs.__newindex(t, config_name, config_def) local pseudo_root = util.path.dirname(api.nvim_buf_get_name(0)) M.manager.add(pseudo_root, true) else - vim.notify(string.format('Autostart for %s failed: matching root directory not detected.', config_name)) + vim.notify( + string.format('[lspconfig] Autostart for %s failed: matching root directory not detected.', config_name) + ) end end @@ -217,7 +219,9 @@ function configs.__newindex(t, config_name, config_def) local pseudo_root = util.path.dirname(api.nvim_buf_get_name(0)) id = manager.add(pseudo_root, true) else - vim.notify(string.format('Autostart for %s failed: matching root directory not detected.', config_name)) + vim.notify( + string.format('lspconfig: Autostart for %s failed: matching root directory not detected.', config_name) + ) end if id then diff --git a/lua/lspconfig/server_configurations/eslint.lua b/lua/lspconfig/server_configurations/eslint.lua index a4f45a54..71a6b38d 100644 --- a/lua/lspconfig/server_configurations/eslint.lua +++ b/lua/lspconfig/server_configurations/eslint.lua @@ -124,11 +124,11 @@ return { return 4 -- approved end, ['eslint/probeFailed'] = function() - vim.notify('ESLint probe failed.', vim.log.levels.WARN) + vim.notify('[lspconfig] ESLint probe failed.', vim.log.levels.WARN) return {} end, ['eslint/noLibrary'] = function() - vim.notify('Unable to find ESLint library.', vim.log.levels.WARN) + vim.notify('[lspconfig] Unable to find ESLint library.', vim.log.levels.WARN) return {} end, }, diff --git a/lua/lspconfig/server_configurations/rust_analyzer.lua b/lua/lspconfig/server_configurations/rust_analyzer.lua index b608dec2..c0733f73 100644 --- a/lua/lspconfig/server_configurations/rust_analyzer.lua +++ b/lua/lspconfig/server_configurations/rust_analyzer.lua @@ -43,8 +43,8 @@ return { cargo_workspace_dir = vim.fn.json_decode(cargo_metadata)['workspace_root'] else vim.notify( - string.format('cmd [%q] failed:\n%s', table.concat(cmd, ' '), cargo_metadata_err), - vim.log.levels.Warning + string.format('[lspconfig] cmd (%q) failed:\n%s', table.concat(cmd, ' '), cargo_metadata_err), + vim.log.levels.WARN ) end return cargo_workspace_dir diff --git a/lua/lspconfig/server_configurations/vdmj.lua b/lua/lspconfig/server_configurations/vdmj.lua index c9cd36f8..9699b936 100644 --- a/lua/lspconfig/server_configurations/vdmj.lua +++ b/lua/lspconfig/server_configurations/vdmj.lua @@ -1,10 +1,5 @@ local util = require 'lspconfig.util' -if vim.fn.has 'nvim-0.5.1' == 0 then - vim.notify('The VDMJ language server requires nvim > 0.5', vim.log.levels.ERROR) - return -end - local mavenrepo = util.path.join(vim.env.HOME, '.m2', 'repository', 'com', 'fujitsu') local function get_jar_path(config, package, version) diff --git a/lua/lspconfig/util.lua b/lua/lspconfig/util.lua index 915396b3..b6780aa9 100644 --- a/lua/lspconfig/util.lua +++ b/lua/lspconfig/util.lua @@ -260,9 +260,10 @@ function M.server_per_root_dir_manager(_make_config) if not new_config.cmd then vim.notify( string.format( - 'Error: cmd not defined for %q. Manually set cmd in the setup {} call according to server_configurations.md, see :help lspconfig-index.', + '[lspconfig] cmd not defined for %q. Manually set cmd in the setup {} call according to server_configurations.md, see :help lspconfig-index.', new_config.name - ) + ), + vim.log.levels.ERROR ) return end |
