aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2024-09-29 23:41:28 +0200
committerJustin M. Keyes <justinkz@gmail.com>2024-09-29 23:41:28 +0200
commit0678aa439b82965daf03679cd146e84f10e299c3 (patch)
tree9c08717f9c724e07d8128ae05b951215141b98d2 /test
parentdocs: cleanup, deprecate APIs #3328 (diff)
downloadnvim-lspconfig-0678aa439b82965daf03679cd146e84f10e299c3.tar
nvim-lspconfig-0678aa439b82965daf03679cd146e84f10e299c3.tar.gz
nvim-lspconfig-0678aa439b82965daf03679cd146e84f10e299c3.tar.bz2
nvim-lspconfig-0678aa439b82965daf03679cd146e84f10e299c3.tar.lz
nvim-lspconfig-0678aa439b82965daf03679cd146e84f10e299c3.tar.xz
nvim-lspconfig-0678aa439b82965daf03679cd146e84f10e299c3.tar.zst
nvim-lspconfig-0678aa439b82965daf03679cd146e84f10e299c3.zip
docs: remove minimal_init.lua
Since https://github.com/neovim/nvim-lspconfig/pull/3328#discussion_r1780185674 the docs now link to Nvim core's LSP bug report template, which provides its own minimal init. Thus we don't need to maintain a different "minimal_init" in this repo.
Diffstat (limited to 'test')
-rw-r--r--test/minimal_init.lua69
1 files changed, 0 insertions, 69 deletions
diff --git a/test/minimal_init.lua b/test/minimal_init.lua
deleted file mode 100644
index 8b27728d..00000000
--- a/test/minimal_init.lua
+++ /dev/null
@@ -1,69 +0,0 @@
-local on_windows = vim.loop.os_uname().version:match 'Windows'
-
-local function join_paths(...)
- local path_sep = on_windows and '\\' or '/'
- local result = table.concat({ ... }, path_sep)
- return result
-end
-
-vim.cmd [[set runtimepath=$VIMRUNTIME]]
-
-local temp_dir = vim.loop.os_getenv 'TEMP' or '/tmp'
-
-vim.cmd('set packpath=' .. join_paths(temp_dir, 'nvim', 'site'))
-
-local package_root = join_paths(temp_dir, 'nvim', 'site', 'pack')
-local lspconfig_path = join_paths(package_root, 'test', 'start', 'nvim-lspconfig')
-
-if vim.fn.isdirectory(lspconfig_path) ~= 1 then
- vim.fn.system { 'git', 'clone', 'https://github.com/neovim/nvim-lspconfig', lspconfig_path }
-end
-
-vim.lsp.set_log_level 'trace'
-require('vim.lsp.log').set_format_func(vim.inspect)
-local nvim_lsp = require 'lspconfig'
-local on_attach = function(_, bufnr)
- local function buf_set_option(...)
- vim.api.nvim_buf_set_option(bufnr, ...)
- end
-
- buf_set_option('omnifunc', 'v:lua.vim.lsp.omnifunc')
-
- -- Mappings.
- local opts = { buffer = bufnr, noremap = true, silent = true }
- vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, opts)
- vim.keymap.set('n', 'gd', vim.lsp.buf.definition, opts)
- vim.keymap.set('n', 'K', vim.lsp.buf.hover, opts)
- vim.keymap.set('n', 'gi', vim.lsp.buf.implementation, opts)
- vim.keymap.set('n', '<C-k>', vim.lsp.buf.signature_help, opts)
- vim.keymap.set('n', '<space>wa', vim.lsp.buf.add_workspace_folder, opts)
- vim.keymap.set('n', '<space>wr', vim.lsp.buf.remove_workspace_folder, opts)
- vim.keymap.set('n', '<space>wl', function()
- print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
- end, opts)
- vim.keymap.set('n', '<space>D', vim.lsp.buf.type_definition, opts)
- vim.keymap.set('n', '<space>rn', vim.lsp.buf.rename, opts)
- vim.keymap.set('n', 'gr', vim.lsp.buf.references, opts)
- vim.keymap.set('n', '<space>e', vim.diagnostic.open_float, opts)
- vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, opts)
- vim.keymap.set('n', ']d', vim.diagnostic.goto_next, opts)
- vim.keymap.set('n', '<space>q', vim.diagnostic.setloclist, opts)
-end
-
--- Add the server that troubles you here
-local name = 'pyright'
-local cmd = { 'pyright-langserver', '--stdio' } -- needed for elixirls, lua_ls, omnisharp
-if not name then
- print 'You have not defined a server name, please edit minimal_init.lua'
-end
-if not nvim_lsp[name].document_config.default_config.cmd and not cmd then
- print [[You have not defined a server default cmd for a server
- that requires it please edit minimal_init.lua]]
-end
-
-nvim_lsp[name].setup {
- cmd = cmd,
- on_attach = on_attach,
-}
-
-print [[You can find your log at $HOME/.cache/nvim/lsp.log. Please paste in a github issue under a details tag as described in the issue template.]]