Skip to content

Conversation

luisdavim
Copy link
Contributor

This should fix #7 and #21

let filename = expand("%:t")
if filepath =~ '\v/(templates|charts)/.*\.(ya?ml|gotmpl|tpl|txt)$' | return 1 | en
if filename =~ '\v(helmfile).ya?ml' | return 1 | en
if getline(1) =~ '^apiVersion:' || getline(2) =~ '^apiVersion:' | return 1 | en
Copy link
Contributor

Choose a reason for hiding this comment

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

This would also set the filetype of normal kubernetes yaml files to helm. I'm not sure if this would be a problem.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Maybe I could add a condition and only do this if the helm language server is installed. What do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I guess it's not really needed, I was just folloing an idea from #7 , I've removed it.

This should fix towolf#7 and towolf#21

Signed-off-by: Luis Davim <luis.davim@gmail.com>
@towolf towolf merged commit 0c0ad99 into towolf:master May 21, 2024
@towolf
Copy link
Owner

towolf commented May 21, 2024

Thanks for the contribution!

@towolf towolf mentioned this pull request May 21, 2024
@luisdavim luisdavim deleted the patch-1 branch May 22, 2024 10:18
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.

Improve ftdetect

3 participants