robin/laufey

git clone https://git.robinwobin.dev/robin/laufey

Maria Solanofix(docs): add `--clean` arg to LSP bug report (#36530)5582005ac7

master
3.1 KiB88 linesraw
1name: Language server (LSP) client bug
2description: Report an issue with Nvim LSP
3title: "LSP: "
4type: bug
5labels: [lsp]
6body:
7
8  - type: markdown
9    attributes:
10      value: |
11        _Before reporting:_ search [existing issues](https://github.com/neovim/neovim/issues?q=is%3Aissue%20is%3Aopen%20type%3ABug) and check the [FAQ](https://neovim.io/doc/user/faq.html). Usage questions or "Why isn't X language server/feature working?" belong on [stackoverflow](https://vi.stackexchange.com/) and will be closed.
12
13  - type: textarea
14    attributes:
15      label: "Problem"
16      description: "Describe the bug caused by the Nvim LSP client."
17    validations:
18      required: true
19  - type: textarea
20    attributes:
21      label: 'Steps to reproduce using "nvim --clean -u minimal_init.lua"'
22      description: |
23        - Create a minimal_init.lua using vim.lsp.start:
24
25        ```lua
26        --- CHANGE THESE
27        local pattern = 'the-filetype'
28        local cmd = {'name-of-language-server-executable'}
29        -- Add files/folders here that indicate the root of a project
30        local root_markers = {'.git', '.editorconfig'}
31        -- Change to table with settings if required
32        local settings = vim.empty_dict()
33
34        vim.api.nvim_create_autocmd('FileType', {
35          pattern = pattern,
36          callback = function(args)
37            local match = vim.fs.find(root_markers, { path = args.file, upward = true })[1]
38            local root_dir = match and vim.fn.fnamemodify(match, ':p:h') or nil
39            vim.lsp.start({
40              name = 'bugged-ls',
41              cmd = cmd,
42              root_dir = root_dir,
43              settings = settings
44            })
45          end
46        })
47        ```
48
49        See `:h lsp-quickstart` and `:h vim.lsp.start` for more information
50
51        - Provide a short code example and describe the folder layout
52        - Describe how to trigger the issue. E.g. using `:lua vim.lsp.buf.*` commands
53
54        _Note_: if the issue is with an autocompletion or other LSP plugin, report to that plugin's issue tracker.
55    validations:
56      required: true
57  - type: textarea
58    attributes:
59      label: "Expected behavior"
60      description: "Describe the behavior you expect. May include logs, images, or videos."
61
62  - type: input
63    attributes:
64      label: "Nvim version (nvim -v)"
65      placeholder: "0.6.0 commit db1b0ee3b30f"
66    validations:
67      required: true
68  - type: input
69    attributes:
70      label: "Language server name/version"
71      placeholder: "rls 0.5.2"
72    validations:
73      required: true
74  - type: input
75    attributes:
76      label: "Operating system/version"
77      placeholder: "emacs 23"
78    validations:
79      required: true
80
81  - type: input
82    attributes:
83      label: "Log file"
84      placeholder: "https://gist.github.com/prakhar1989/1b0a2c9849b2e1e912fb"
85      description: |
86        - Upload `lsp.log` before and after the problem in a [secret gist](https://gist.github.com/). Paste the URL to the gist.
87        - You can set the log level by adding `vim.lsp.set_log_level("debug")` after setting up LSP in your config.
88        - You can find the location of the log with `:lua print(vim.lsp.get_log_path())`