Giter Site home page Giter Site logo

Indentation is broken about vim-fish HOT 10 OPEN

dag avatar dag commented on July 16, 2024
Indentation is broken

from vim-fish.

Comments (10)

dag avatar dag commented on July 16, 2024

Hmm, I thought I fixed this. I'll have a look at it again.

from vim-fish.

RobertAudi avatar RobertAudi commented on July 16, 2024

@dag Why don't you use the indentation stuff from this other fish vim plugin?

https://github.com/Soares/fish.vim/blob/master/indent/fish.vim

from vim-fish.

dag avatar dag commented on July 16, 2024

Have you tried that with endwise? Thinking about it more now I think the problem is that if you make = work then you break endwise, and what's in vim-fish currently is a compromise optimized for input - at the expense of editing. If you manually write it line by line, everything is good and you get end inserted for you, but as you discovered trying to format blocks of existing code gets messed up.

If I can't figure out how to make everything work together maybe I should add an option for disabling endwise for fish all together, and make = work instead. Thoughts?

from vim-fish.

dag avatar dag commented on July 16, 2024

I should note, you can also use gq to format using the native fish_indent. Downside is that only produces tabulators. Maybe I could hack that to run a substitute on the result to post-process.

from vim-fish.

RobertAudi avatar RobertAudi commented on July 16, 2024

@dag I managed to make endwise work with = using the indentation stuff I linked in my previous comment. I created a plugin that combines your stuff with the stuff of the other plugin. My version can be found here:

https://github.com/AzizLight/fish.vim

from vim-fish.

alcortesm avatar alcortesm commented on July 16, 2024

IMHO, vim-fish should not break =.

I don't have endwise installed, but my vim is still unable to indent code properly when using vim-fish.

Endwise is nice but a luxury, indenting code properly is a must.

How can I tell vim-fish to be compatible with =?

from vim-fish.

hovsater avatar hovsater commented on July 16, 2024

Yeah, I'm also seeing broken behaviour when indenting using =. Have anyone come to any conclusions regarding this?

from vim-fish.

nhooyr avatar nhooyr commented on July 16, 2024

Any updates?

from vim-fish.

nhooyr avatar nhooyr commented on July 16, 2024

https://github.com/RobertAudi/fish.vim (same as https://github.com/AzizLight/fish.vim) works much better

from vim-fish.

c02y avatar c02y commented on July 16, 2024

@nhooyr None of them works well on indentation.

from vim-fish.

Related Issues (20)

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.