Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
57 changes: 57 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
---
name: Bug Report
about: Report a bug or unexpected behavior
title: '[BUG] '
labels: bug
assignees: ''
---

## Bug Description

A clear and concise description of what the bug is.

## Steps to Reproduce

1. Open Vim with '...'
2. Edit Solidity file containing '...'
3. Perform action '...'
4. See error/unexpected behavior

## Expected Behavior

A clear description of what you expected to happen.

## Actual Behavior

What actually happened instead.

## Minimal Solidity Code Example

```solidity
// Minimal code that reproduces the issue
contract Example {
// ...
}
```

## Environment

- **Vim version**: (output of `vim --version`)
- **OS**: (e.g., Ubuntu 22.04, macOS 14.0, Windows 11)
- **Terminal**: (e.g., iTerm2, Windows Terminal, GNOME Terminal)
- **vim-solidity version/commit**: (e.g., v0.8.0 or commit hash)
- **Solidity version**: (if relevant, e.g., 0.8.24)

## Additional Context

Add any other context about the problem here, such as:
- Does it happen with a minimal vimrc?
- Related Vim plugins that might interact?
- Screenshots if applicable

## Checklist

- [ ] I have searched existing issues for duplicates
- [ ] I have tested with a minimal vimrc (`vim -Nu test/vimrc`)
- [ ] I have provided a minimal code example
- [ ] I have included my environment details
57 changes: 57 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
---
name: Feature Request
about: Suggest a new feature or enhancement
title: '[FEATURE] '
labels: enhancement
assignees: ''
---

## Feature Description

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

## Motivation / Use Case

Why is this feature useful? What problem does it solve?

## Proposed Solution

How would you like this feature to work? Be as specific as possible.

```vim
" Example configuration or usage
```

```solidity
// Example Solidity code if applicable
```

## Alternatives Considered

What other approaches or workarounds have you considered?

## Compatibility

- Is this feature specific to a Solidity version? (e.g., 0.8.x only)
- Should it work in both Vim and Neovim?
- Does it depend on external tools? (e.g., solc, forge)

## Scope

- [ ] Syntax highlighting
- [ ] Indentation
- [ ] Code folding
- [ ] File type detection
- [ ] Toolchain integration (compiler, formatter)
- [ ] Documentation
- [ ] Other (please specify)

## Additional Context

Add any other context, mockups, screenshots, or examples about the feature request here.

## Checklist

- [ ] I have searched existing issues for similar requests
- [ ] I have checked the [roadmap/plan](link-to-plan-if-available)
- [ ] This feature aligns with pure Vim compatibility (no Neovim-only features)
43 changes: 43 additions & 0 deletions .github/ISSUE_TEMPLATE/question.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
name: Question
about: Ask a question about using vim-solidity
title: '[QUESTION] '
labels: question
assignees: ''
---

## Question

What would you like to know about vim-solidity?

## Context

Provide context about what you're trying to accomplish:

- What are you trying to do?
- What have you already tried?
- What's not working as expected?

## Configuration

If relevant, share your Vim configuration:

```vim
" Relevant parts of your .vimrc
```

## Environment

- **Vim version**: (output of `vim --version`)
- **vim-solidity version**: (e.g., v0.8.0 or commit hash)

## Additional Information

Any other details that might be helpful.

---

**Note**: For general Vim or Solidity questions unrelated to this plugin, you may find better help at:
- [Vi and Vim Stack Exchange](https://vi.stackexchange.com/)
- [Ethereum Stack Exchange](https://ethereum.stackexchange.com/)
- [Solidity Documentation](https://docs.soliditylang.org/)
41 changes: 41 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Test

on:
push:
branches: [ main, revamp ]
pull_request:
branches: [ main, revamp ]

jobs:
test:
runs-on: ubuntu-latest

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

- name: Install Vim
run: |
sudo apt-get update
sudo apt-get install -y vim

- name: Clone vader.vim
run: |
git clone --depth 1 https://github.com/junegunn/vader.vim.git test/vader.vim

- name: Run syntax tests
run: |
vim -Nu test/vimrc -c 'Vader! test/vader/syntax.vader'

- name: Run folding tests
run: |
vim -Nu test/vimrc -c 'Vader! test/vader/folding.vader'

- name: Run indentation tests
run: |
vim -Nu test/vimrc -c 'Vader! test/vader/indent.vader'

- name: Test summary
if: always()
run: |
echo "✓ All tests completed"
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
test/vader.vim/
100 changes: 100 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
# Changelog

All notable changes to vim-solidity will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

Nothing yet - next release will be 0.9.0 with Foundry tooling integration.

## [0.8.0] - 2026-01-13

**Major release with modern Solidity 0.8.x support and testing infrastructure**

### Added
- Comprehensive testing infrastructure with vader.vim
- GitHub Actions CI for automated testing
- Solidity 0.8.24 `transient` keyword support
- Solidity 0.8.19 `using ... global` syntax support
- Solidity 0.8.18 user-defined value types (`type Foo is uint256`)
- Solidity 0.8.4 `error` keyword for custom errors
- `unchecked` block syntax (0.8.0+)
- `fallback()` and `receive()` special function keywords
- `global` keyword for library attachments
- Contract-level code folding for contracts, libraries, and interfaces
- Foundry test file detection (`.t.sol` extension)
- Foundry script file detection (`.s.sol` extension)
- Buffer-local variable `b:solidity_file_type` to distinguish file types
- Test fixtures for modern Solidity features, indentation, and folding
- Comprehensive test suites for syntax, indentation, and folding

### Fixed
- Contract bodies can now be folded (Issue #11)
- String literal syntax highlighting after function signatures (Issue #15)

### Known Issues
- Indentation for some multi-line constructs may need manual adjustment (Issue #5)
- The indent logic is based on JavaScript and works well for most cases
- Complex multi-line function signatures with modifiers may need refinement
- Contributions welcome to improve edge cases

### Changed
- Enhanced ftdetect to recognize Foundry file naming conventions
- Improved syntax highlighting for modern Solidity 0.8.x features
- Updated maintainer information

## [0.7.0] - 2021-01-17

### Changed
- Leave foldmethod to be configured by the user
- Fix syntax file maintainer

### Added
- Add 'require' to keywords
- Add 'revert' to keywords
- Add Yul opcode dialect
- Ensure Yul ops only highlight in assembly blocks
- Add 'switch' to statements

### Improved
- Better handling of comments and doc comments
- Enhanced NatSpec comment support

---

## Migration Notes

### From 0.7.0 to Unreleased

If you were using the old vim-solidity, the main changes are:

1. **Modern Solidity Support**: All Solidity 0.8.x features are now supported
2. **Contract Folding**: Enable with `set foldmethod=syntax` to fold entire contracts
3. **Foundry Support**: `.t.sol` and `.s.sol` files are automatically recognized
4. **Testing**: The plugin now has comprehensive automated tests

### Future Breaking Changes

No breaking changes are planned. The plugin maintains backward compatibility
with Vim 8.0+ and works in Neovim (though Neovim users may prefer solidity.nvim
for LSP features).

---

## Version History

- **Unreleased**: Modern Solidity 0.8.x support, testing infrastructure, Foundry integration
- **0.7.0**: Yul support, comment improvements, basic keyword additions
- **Earlier versions**: See git history

---

## Contributing

See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines on contributing to vim-solidity.

## License

MIT License - see [LICENSE](LICENSE) for details.
Loading