diff options
| author | Josh Rahm <joshuarahm@gmail.com> | 2023-01-25 18:31:31 +0000 |
|---|---|---|
| committer | Josh Rahm <joshuarahm@gmail.com> | 2023-01-25 18:31:31 +0000 |
| commit | 9243becbedbb6a1592208051f8fa2b090dcc5e7d (patch) | |
| tree | 607c2a862ec3f4399b8766383f6f8e04c4aa43b4 /.github/ISSUE_TEMPLATE/lsp_bug_report.yml | |
| parent | 9e40b6e9e1bc67f2d856adb837ee64dd0e25b717 (diff) | |
| parent | 3c48d3c83fc21dbc0841f9210f04bdb073d73cd1 (diff) | |
| download | rneovim-usermarks.tar.gz rneovim-usermarks.tar.bz2 rneovim-usermarks.zip | |
Merge remote-tracking branch 'upstream/master' into usermarksusermarks
Diffstat (limited to '.github/ISSUE_TEMPLATE/lsp_bug_report.yml')
| -rw-r--r-- | .github/ISSUE_TEMPLATE/lsp_bug_report.yml | 34 |
1 files changed, 32 insertions, 2 deletions
diff --git a/.github/ISSUE_TEMPLATE/lsp_bug_report.yml b/.github/ISSUE_TEMPLATE/lsp_bug_report.yml index 0ed163c9be..88867ce644 100644 --- a/.github/ISSUE_TEMPLATE/lsp_bug_report.yml +++ b/.github/ISSUE_TEMPLATE/lsp_bug_report.yml @@ -31,8 +31,38 @@ body: attributes: label: 'Steps to reproduce using "nvim -u minimal_init.lua"' description: | - - Download the minimal config with `curl -LO https://raw.githubusercontent.com/neovim/nvim-lspconfig/master/test/minimal_init.lua` and modify it to include any specific commands or servers pertaining to your issues. - - _Note_: if the issue is with an autocompletion or other LSP plugin, report to that plugin's issue tracker. + - Create a minimal_init.lua using vim.lsp.start: + + ```lua + --- CHANGE THESE + local pattern = 'the-filetype' + local cmd = {'name-of-language-server-executable'} + -- Add files/folders here that indicate the root of a project + local root_markers = {'.git', '.editorconfig'} + -- Change to table with settings if required + local settings = vim.empty_dict() + + vim.api.nvim_create_autocmd('FileType', { + pattern = pattern, + callback = function(args) + local match = vim.fs.find(root_markers, { path = args.file, upward = true })[1] + local root_dir = match and vim.fn.fnamemodify(match, ':p:h') or vim.NIL + vim.lsp.start({ + name = 'bugged-ls', + cmd = cmd, + root_dir = root_dir, + settings = settings + }) + end + }) + ``` + + See `:h lsp-quickstart` and `:h vim.lsp.start` for more information + + - Provide a short code example and describe the folder layout + - Describe how to trigger the issue. E.g. using `:lua vim.lsp.buf.*` commands + + _Note_: if the issue is with an autocompletion or other LSP plugin, report to that plugin's issue tracker. validations: required: true |