Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
---
name: Bug Report
about: Create a report to help us improve
title: '[BUG] '
labels: bug
assignees: ''
---

## Bug Description
A clear and concise description of what the bug is.

## Steps to Reproduce
Steps to reproduce the behavior:
1. Go to '...'
2. Run command '....'
3. See error

## Expected Behavior
A clear and concise description of what you expected to happen.

## Actual Behavior
What actually happened instead.

## Environment
- OS: [e.g. Ubuntu 22.04, macOS 13.0, Windows 11]
- Vim/Neovim version: [output of `:version`]
- Plugin version/commit: [e.g. commit hash or tag]
- TMC CLI version: [output of `tmc-langs-cli --version`]

## Configuration
Relevant parts of your `.vimrc` or `init.vim`:
```vim
" Paste your relevant config here
```

## Error Messages
```
Paste any error messages here
```

## Additional Context
- Output of `:TmcStatus`:
- Output of `:TmcProjectsDir`:
- Any other relevant information

## Minimal Reproduction
If possible, provide a minimal `.vimrc` that reproduces the issue:
```vim
set nocompatible
" Add minimal config to reproduce
```

## Possible Solution
If you have any ideas on how to fix the bug, please share them here.

44 changes: 44 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
name: Feature Request
about: Suggest an idea for this project
title: '[FEATURE] '
labels: enhancement
assignees: ''
---

## Feature Description
A clear and concise description of the feature you'd like to see.

## Problem Statement
Describe the problem this feature would solve. Ex. I'm always frustrated when [...]

## Proposed Solution
Describe the solution you'd like. How should this feature work?

## Alternative Solutions
Describe any alternative solutions or features you've considered.

## Use Cases
Describe specific use cases for this feature:
1. Use case 1
2. Use case 2

## Benefits
Who would benefit from this feature and how?

## Implementation Ideas
If you have ideas about how this could be implemented, share them here.

## Examples
If other tools/plugins have this feature, provide examples:
- Tool X does this by...
- Plugin Y implements this as...

## Additional Context
Add any other context, screenshots, or mockups about the feature request here.

## Checklist
- [ ] I have searched for similar feature requests
- [ ] This feature would be useful to most users, not just me
- [ ] I am willing to help implement this feature (optional)

77 changes: 77 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
## Description
<!-- Provide a clear and concise description of your changes -->

## Type of Change
<!-- Mark the relevant option with an 'x' -->
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Documentation update
- [ ] Code refactoring
- [ ] Performance improvement
- [ ] Test coverage improvement

## Related Issues
<!-- Link to related issues, e.g., "Fixes #123" or "Relates to #456" -->
Fixes #

## Changes Made
<!-- List the main changes in this PR -->
- Change 1
- Change 2
- Change 3

## Testing
<!-- Describe the tests you ran to verify your changes -->

### Test Configuration
- OS: [e.g. Ubuntu 22.04]
- Vim/Neovim version: [e.g. Neovim 0.9.0]

### Test Coverage
- [ ] Added unit tests for new functionality
- [ ] Added integration tests
- [ ] All existing tests pass
- [ ] Tested manually in Vim
- [ ] Tested manually in Neovim

### Test Commands Run
```bash
# List the test commands you ran
vim -Nu NONE -c "Vader! test/**/*.vader"
vint autoload/ plugin/
```

## Documentation
- [ ] Updated README.md (if needed)
- [ ] Updated doc/tmc.txt (if needed)
- [ ] Updated CONTRIBUTING.md (if needed)
- [ ] Added/updated code comments

## Code Quality
- [ ] My code follows the project's code style guidelines
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] My changes generate no new warnings or errors
- [ ] Linter passes without errors (`vint autoload/ plugin/`)

## Breaking Changes
<!-- If this is a breaking change, describe what breaks and how to migrate -->
N/A or:
- Breaking change 1: How to migrate
- Breaking change 2: How to migrate

## Screenshots/Demos
<!-- If applicable, add screenshots or demo GIFs to help explain your changes -->

## Checklist
- [ ] I have read the CONTRIBUTING.md document
- [ ] My code follows the code style of this project
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] All new and existing tests pass
- [ ] I have updated the documentation accordingly
- [ ] I have checked my code and corrected any misspellings

## Additional Notes
<!-- Add any additional notes or context about the PR here -->

191 changes: 191 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,191 @@
name: CI

on:
push:
branches: [ main, master, develop ]
pull_request:
branches: [ main, master, develop ]

jobs:
test:
name: Test on ${{ matrix.editor }} (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
# Vim versions
- os: ubuntu-latest
editor: vim-8.2
version: v8.2.0000
neovim: false
- os: ubuntu-latest
editor: vim-9.0
version: v9.0.0000
neovim: false
- os: macos-latest
editor: vim-9.0
version: v9.0.0000
neovim: false
# Neovim versions
- os: ubuntu-latest
editor: neovim-0.5
version: v0.5.0
neovim: true
- os: ubuntu-latest
editor: neovim-0.9
version: v0.9.0
neovim: true
- os: macos-latest
editor: neovim-0.9
version: v0.9.0
neovim: true
- os: ubuntu-latest
editor: neovim-stable
version: stable
neovim: true
- os: macos-latest
editor: neovim-stable
version: stable
neovim: true

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Vim/Neovim
uses: rhysd/action-setup-vim@v1
with:
version: ${{ matrix.version }}
neovim: ${{ matrix.neovim }}

- name: Smoke test - Plugin loads
run: |
if command -v nvim &> /dev/null; then
echo "Testing with Neovim"
nvim --version
nvim --headless -u NONE \
-c "set runtimepath+=." \
-c "runtime plugin/tmc.vim" \
-c "if exists(':TmcRunTests') | echo 'Plugin loaded successfully' | cquit 0 | else | echo 'Plugin failed to load' | cquit 1 | endif"
else
echo "Testing with Vim"
vim --version
vim -Nu NONE \
-c "set runtimepath+=." \
-c "runtime plugin/tmc.vim" \
-c "if exists(':TmcRunTests') | echo 'Plugin loaded successfully' | qall! | else | echo 'Plugin failed to load' | cquit | endif"
fi

- name: Install Vader.vim
run: |
git clone --depth 1 https://github.com/junegunn/vader.vim.git ~/.vim/plugged/vader.vim
mkdir -p ~/.local/share/nvim/site/pack/vendor/start
ln -s ~/.vim/plugged/vader.vim ~/.local/share/nvim/site/pack/vendor/start/vader.vim || true

- name: Run tests
run: |
# Find all vader test files
TEST_FILES=$(find test -name "*.vader" -type f | sort)
echo "Found test files:"
echo "$TEST_FILES"

if command -v nvim &> /dev/null; then
nvim --version
for test_file in $TEST_FILES; do
echo "============================================"
echo "Running test: $test_file"
echo "============================================"
nvim --headless -u NONE \
-c "set runtimepath^=~/.vim/plugged/vader.vim" \
-c "set runtimepath^=." \
-c "filetype plugin indent on" \
-c "runtime! plugin/**/*.vim" \
-c "Vader! $test_file" 2>&1 | tee -a test_output.log
if [ ${PIPESTATUS[0]} -ne 0 ]; then
echo "FAILED: $test_file"
exit 1
fi
done
else
vim --version
for test_file in $TEST_FILES; do
echo "============================================"
echo "Running test: $test_file"
echo "============================================"
vim -Nu NONE \
-c "set runtimepath^=~/.vim/plugged/vader.vim" \
-c "set runtimepath^=." \
-c "filetype plugin indent on" \
-c "runtime! plugin/**/*.vim" \
-c "Vader! $test_file" 2>&1 | tee -a test_output.log
if [ ${PIPESTATUS[0]} -ne 0 ]; then
echo "FAILED: $test_file"
exit 1
fi
done
fi
echo "All tests passed!"

- name: Upload test results
if: always()
uses: actions/upload-artifact@v4
with:
name: test-results-${{ matrix.editor }}-${{ matrix.os }}
path: test_output.log

lint:
name: Lint VimScript
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.x'

- name: Install vint
run: |
pip install setuptools
pip install vim-vint

- name: Run vint
run: |
vint --version
vint autoload/ plugin/

docs:
name: Validate documentation
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Check README
run: |
if ! grep -q "TMC-Vim" README.md; then
echo "README.md seems invalid"
exit 1
fi
echo "README.md looks good"

- name: Check help doc exists
run: |
if [ ! -f "doc/tmc.txt" ]; then
echo "Help documentation is missing"
exit 1
fi
echo "Help documentation exists"

- name: Check LICENSE
run: |
if [ ! -f "LICENSE" ]; then
echo "LICENSE file is missing"
exit 1
fi
echo "LICENSE file exists"

Loading