Skip to content

Commit

Permalink
docs: add repro.lua, update bug report template
Browse files Browse the repository at this point in the history
Closes #485
  • Loading branch information
Saghen committed Jan 5, 2025
1 parent d2b411c commit 7aaff96
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 6 deletions.
11 changes: 5 additions & 6 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,15 @@ body:
attributes:
label: Make sure you have done the following
options:
- label: I have updated to the latest version of `blink.cmp`
- label: Updated to the latest version of `blink.cmp`
required: true
- label: I have read the README
- label: Searched for existing issues and documentation (try <C-k> on https://cmp.saghen.dev!)
required: true
- type: textarea
id: bug-description
attributes:
label: Bug Description
description: If the issue may be related to your configuration, please include a [repro.lua](https://github.com/Saghen/blink.cmp/blob/main/repro.lua)
validations: { required: true }
- type: textarea
id: user-config
Expand All @@ -24,9 +25,7 @@ body:
render: lua
placeholder: |
sources = {
completion = {
enabled_providers = { "lsp", "path", "snippets", "buffer" },
},
default = { 'lsp', 'path', 'snippets', 'buffer' },
},
validations: { required: false }
- type: input
Expand All @@ -39,5 +38,5 @@ body:
id: branch-or-tag
attributes:
label: "`blink.cmp` version: branch, tag, or commit"
placeholder: "for example: main or v0.4.0"
placeholder: "examples: main, d2b411c or v0.9.2"
validations: { required: true }
32 changes: 32 additions & 0 deletions repro.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
-- Run with `nvim -u repro.lua`

vim.env.LAZY_STDPATH = '.repro'
load(vim.fn.system('curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua'))()

require('lazy.minit').repro({
spec = {
{
'saghen/blink.cmp',
-- please test on `main` if possible
-- otherwise, remove this line and set `version = '*'`
build = 'cargo build --release',
opts = {},
},
{
'neovim/nvim-lspconfig',
opts = {
servers = {
lua_ls = {},
},
},
config = function(_, opts)
local lspconfig = require('lspconfig')
for server, config in pairs(opts.servers) do
-- passing config.capabilities to blink.cmp merges with the capabilities in your
config.capabilities = require('blink.cmp').get_lsp_capabilities()
lspconfig[server].setup(config)
end
end,
},
},
})

0 comments on commit 7aaff96

Please sign in to comment.