Git Product home page Git Product logo

Comments (5)

blaenk avatar blaenk commented on June 23, 2024

I just saw #59 but I admit I'm not sure I understand it. I noticed of course that I could "add" my own language, so for example if I type python and create a new one, it will indeed enter python, but now I'll have python and Python even though I only intend to have one. I think an option like I'm saying would be nice because users who want this wouldn't have to create "alternate" versions of each language they use and get a lot of leftover capitalized languages in the completing-read list.

To be clear, I of course don't mind (and in fact appreciate) the fact that the names are capitalized in the completing-read list, what I'm saying is that I would prefer it if the chosen language was inserted as a lower-case version of it.

from markdown-mode.

cosmicexplorer avatar cosmicexplorer commented on June 23, 2024

I agree that the lowercased version is more common; I think this is what @jrblevin was hinting at in his earlier issue on this topic.

#73 adds a defcustom markdown-gfm-downcase-languages, which adds the behavior you describe and defaults to t. The weird thing I've noticed is that using helm, even with completion-ignore-case off, completing-read will return "" if the entered pattern is a downcased version of a completion airbender, which shouldn't happen. I believe this is a bug in helm's completing-read, since completing-read-default seems to work just fine; I will investigate this.

Essentially, it now defaults to using the lowercased version of a language for all of the "preloaded" languages. If it parses a buffer upon opening and finds languages that are not preloaded (this includes alternative capitalizations), it adds those as candidates. This means that within a file, if that file uses the uppercased versions of "Ruby" or "Python", for example, those will be included as completions, but only within that buffer. Otherwise, the lowercased versions of all languages will be preferred for completion of a partial input. I've added this behavior to the test case for this feature.

from markdown-mode.

blaenk avatar blaenk commented on June 23, 2024

Amazing! I really appreciate it, thank you!

from markdown-mode.

cosmicexplorer avatar cosmicexplorer commented on June 23, 2024

emacs-helm/helm#1331 I've made an issue on helm, so that's definitely a helm thing. Should be fine for everyone else.

from markdown-mode.

jrblevin avatar jrblevin commented on June 23, 2024

Good idea. I also use lowercase names (in my workflows they usually translate to class names for XHTML elements), so I appreciate having this flexibility.

from markdown-mode.

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.