Git Product home page Git Product logo

vim-just's Introduction

Vim Just Syntax

Vim syntax files for justfiles.

Works with Vim/GVim >= 8, Neovim >= 0.4.

Installation

cd ~/.vim/pack/YOUR-NAMESPACE-HERE/start/
git clone https://github.com/NoahTheDuke/vim-just.git

With a plugin manager

Plug 'NoahTheDuke/vim-just'
{
  "NoahTheDuke/vim-just",
  ft = { "just" },
}

Third-party packages

For questions or issues when using these packages, contact the package's maintainer.

Packaging status


Updating git clone based installations

Run the same cd command as in the relevant installation instructions, then:

cd vim-just
git pull --tags --verbose

Old git clone based installations

In late March 2023, development was moved from master branch to main branch, and master is no longer maintained. Updating installations that used a git clone prior to these changes requires some additional one-time steps, run after the normal update procedure:

git checkout main
git branch -d master || git branch --unset-upstream master
git remote set-head origin -a
git remote prune origin

Now future updates can again be obtained normally.


Contributing & Development

Make some changes, open a PR, easy-peasy. I like to manually apply PRs, so don't be surprised if I close your PR while pushing your authored commit directly to main.

Prerequisites

Run just deps to install the cargo dev dependencies, which right now is only cargo-watch.

Test Suite

vim-just includes automated tests of its syntax highlighting and filetype detection. Running the tests invokes Cargo to build and run the project, which is a simple test-runner in the main fn.

To run the syntax highlighting tests, run just run in tests/. If you want to run only a subset of the syntax highlighting tests, you can pass an optional regex parameter to just run matching the filenames you want to include:

# run only the 'kitchen-sink.just' syntax highlighting test
$ just run kitchen-sink
...
test kitchen-sink…
ok

# run the syntax highlighting tests with base filenames matching the regex ^\w+$
$ just run '^\w+$'
...
test comment…
ok
test deprecated_obsolete…
ok
test invalid…
ok
test set…
ok
test tricky…
ok

Note that the .just extension is trimmed off before matching against the regex.

To run the filetype detection tests, run just ftdetect in tests/.

If you're going to do more than a simple change, I recommend calling just watch in tests/, which will watch for any changes in the whole repo and re-run the test suite. By default, it will run the syntax highlighting tests. just watch accepts up to two parameters to customize which tests to watch:

# watch all syntax highlighting tests (default)
$ just watch

# watch ftdetect tests
$ just watch ftdetect

# watch all tests
$ just watch ftdetect run

# watch syntax highlighting tests with filenames matching the regex ^r.*s$
$ just watch run '^r.*s$'

vim-just's People

Contributors

laniakea64 avatar noahtheduke avatar casey avatar aaronkollasch avatar erikkrieg avatar tomprince avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.