Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setup plugin #2

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open

Setup plugin #2

wants to merge 10 commits into from

Conversation

vsherratt
Copy link

Initial setup of a plugin

  • Automatic detection in ftdetect/cylc.vim
  • Current syntax file copied to syntax/cylc.vim
    • New syntax group cylcMultiString for triple-quoted strings, which is linked to String, unlike single-quoted strings which are not highlighed at all
  • Simple local settings in ftplugin/cylc.vim (for :filetype plugin)
  • Recommended indentation in indent/cylc.vim (for :filetype indent)

Check List

  • I have read CONTRIBUTING.md and added my name as a Code Contributor.
  • Contains logically grouped changes (else tidy your branch by rebase).

Copy link
Member

@oliver-sanders oliver-sanders left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great, thanks!

Tested using vim-plug and NeoVim v0.7.2.

call plug#begin()
Plug 'vsherratt/cylc.vim', {'branch': 'setup-plugin'}
call plug#end()

indent/cylc.vim Outdated Show resolved Hide resolved
indent/cylc.vim Outdated Show resolved Hide resolved
indent/cylc.vim Outdated Show resolved Hide resolved
@oliver-sanders
Copy link
Member

Opened a PR to update the docs to point at this plugin: cylc/cylc-doc#624

@vsherratt
Copy link
Author

Sorry I totally left this hanging - just reminded by recent prompts for people to get set up with cylc 8. I didn't realise how long it had been!

I'll address the existing comments shortly, and have a look for if the original syntax file has moved on at all. (Unless you're already aware of any changes and can easily point them out?)

@oliver-sanders
Copy link
Member

No probs, thanks for contributing this.

Apologies, my vim script abilities aren't good enough to help out properly.

Not much has happened to the syntax file in the Cylc repo, main changes:

@hjoliver
Copy link
Member

hjoliver commented Aug 8, 2024

I'll try to do a quick review too once you're done @vsherratt

Copy link
Member

@oliver-sanders oliver-sanders left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for contributing this!

Comment on lines +22 to +23
Otherwise, use your favourite plugin manager, such as
[pathogen.vim](https://github.com/tpope/vim-pathogen).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pathogen seems a bit dead looking (note on the project saying not to use it).

Possibly replace with vim-plug:

Suggested change
Otherwise, use your favourite plugin manager, such as
[pathogen.vim](https://github.com/tpope/vim-pathogen).
Otherwise, use your favourite plugin manager, such as
[vim-plug](https://github.com/junegunn/vim-plug):
`Plug 'cylc/cylc.vim'`

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The note on pathogen is not because it's dead per se, it's because its behaviour is so close to vim 8's package management that you might as well use that. That's what I like it for: it backports that functionality. Could still make more sense to mention vim-plug than that, not sure...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants