Skip to content

Commit

Permalink
docs: add issue template with a minimal config file
Browse files Browse the repository at this point in the history
Related to #62
  • Loading branch information
JoosepAlviste committed Apr 18, 2023
1 parent 864b628 commit d6dff02
Show file tree
Hide file tree
Showing 2 changed files with 104 additions and 0 deletions.
55 changes: 55 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Bug Report
description: Report a problem in nvim-ts-context-commentstring
labels: [bug]

body:
- type: textarea
attributes:
label: "Minimal reproducible full config"
description: |
Please provide a working config based on [this](https://github.com/JoosepAlviste/nvim-ts-context-commentstring/blob/main/utils/minimal_init.lua).
**Tip**: You can use `:h $NVIM_APPNAME` to easily set up a second config.
1. Create a new directory at ~/.config/nvim-test
2. Copy the minimal init.lua to that folder
3. Run nvim with `NVIM_APPNAME=nvim-test nvim`
4. Make the necessary changes to the config file to reproduce your issue
value: |
```lua
-- Your configuration here
```
validations:
required: true

- type: textarea
attributes:
label: "Description"
description: "Describe in detail what happens"
validations:
required: true

- type: textarea
attributes:
label: "Steps to reproduce"
description: "Full reproduction steps. Please include a sample file if your issue relates to a specific filetype."
validations:
required: true

- type: textarea
attributes:
label: "Expected behavior"
description: "A description of the behavior you expected."
validations:
required: true

- type: textarea
attributes:
label: "Actual behavior"
description: "A description of the actual behavior."
validations:
required: true

- type: textarea
attributes:
label: "Additional context"
description: "Any other relevant information"
49 changes: 49 additions & 0 deletions utils/minimal_init.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
-- Install lazy.nvim automatically
local lazypath = vim.fn.stdpath 'data' .. '/lazy/lazy.nvim'
if not vim.loop.fs_stat(lazypath) then
vim.fn.system {
'git',
'clone',
'--filter=blob:none',
'https://github.com/folke/lazy.nvim.git',
'--branch=stable', -- latest stable release
lazypath,
}
end
vim.opt.rtp:prepend(lazypath)

-- Or some other small value (Vim default is 4000)
vim.opt.updatetime = 100

require('lazy').setup {
{
'nvim-treesitter/nvim-treesitter',
build = ':TSUpdate',
config = function()
require('nvim-treesitter.configs').setup {
ensure_installed = { 'vim', 'lua' },
highlight = {
enable = true,
},
context_commentstring = {
enable = true,
},
}
end,
dependencies = {
'JoosepAlviste/nvim-ts-context-commentstring',
},
},
{
'numToStr/Comment.nvim',
config = function()
require('Comment').setup()
end,
},
}

-- Try commenting the following vimscript in and out with `gcc`, it should be
-- commented with a double quote character
vim.cmd [[
echo 'Hello World!'
]]

0 comments on commit d6dff02

Please sign in to comment.