2021-08-22 17:06:41 -07:00
name : Language server (LSP) client bug
description : Report an issue with Neovim LSP
2021-07-25 07:07:20 -07:00
labels : [ bug, lsp]
body :
- type : markdown
attributes :
value : |
2022-12-14 11:58:18 -07:00
_Before reporting:_ search [existing issues](https://github.com/neovim/neovim/issues?q=is%3Aissue+is%3Aopen+label%3Abug) and check the [FAQ](https://github.com/neovim/neovim/wiki/FAQ). Usage questions or "Why isn't X language server/feature working?" belong on [stackoverflow](https://vi.stackexchange.com/) and will be closed.
2021-07-25 07:07:20 -07:00
2022-12-14 11:58:18 -07:00
- type : textarea
2021-07-25 07:07:20 -07:00
attributes :
2022-12-14 11:58:18 -07:00
label : "Problem"
description : "Describe the bug caused by the Nvim LSP client."
2021-07-25 07:07:20 -07:00
validations :
required : true
- type : textarea
attributes :
2021-08-22 17:06:41 -07:00
label : 'Steps to reproduce using "nvim -u minimal_init.lua"'
description : |
2023-01-23 03:11:53 -07:00
- 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]
2023-02-16 11:54:52 -07:00
local root_dir = match and vim.fn.fnamemodify(match, ':p:h') or nil
2023-01-23 03:11:53 -07:00
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.
2021-07-25 07:07:20 -07:00
validations :
required : true
- type : textarea
attributes :
label : "Expected behavior"
2021-08-22 16:56:41 -07:00
description : "Describe the behavior you expect. May include logs, images, or videos."
2022-12-14 11:58:18 -07:00
- type : input
attributes :
label : "Neovim version (nvim -v)"
placeholder : "0.6.0 commit db1b0ee3b30f"
validations :
required : true
- type : input
attributes :
label : "Language server name/version"
placeholder : "rls 0.5.2"
validations :
required : true
- type : input
2021-07-25 07:07:20 -07:00
attributes :
2022-12-14 11:58:18 -07:00
label : "Operating system/version"
placeholder : "emacs 23"
validations :
required : true
2021-07-25 07:07:20 -07:00
- type : input
attributes :
2021-08-22 17:06:41 -07:00
label : "Log file"
placeholder : "https://gist.github.com/prakhar1989/1b0a2c9849b2e1e912fb"
description : |
- Upload `lsp.log` before and after the problem in a [secret gist](https://gist.github.com/). Paste the URL to the gist.
- You can set the log level by adding `vim.lsp.set_log_level("debug")` after setting up LSP in your config.
- You can find the location of the log with `:lua print(vim.lsp.get_log_path())`