Code Monkey home page Code Monkey logo

codeblock-completer's People

Contributors

skepticmystic avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

froses

codeblock-completer's Issues

FR: Option to append `{}` for Code Block labels

Another nice plugin I am using is code block label plugin (also beta), which uses {} after the language to set a file name.

Any chance you might add an option to append those? Would remove a tiny bit of friction :)

Bug: Codeblock label `{}` wrongly trigger

Actually, it's three minor bugs all related to the codeblock label:

  1. even turning the setting off, the {} still gets appended
  2. the {} shouldn't be appended for code block types from plugins, since it doesn't matter there and actually makes the code blocks invalid for plugins.
  3. there should be a space between the language-name and the {}
  4. (tiny FR, actually): when having {} turned on, place the cursor between the braces after completion :P

Bug: adding unnecessary line breaks when there is already content

The good news is though, that you plugin fantastically synergizes with my smarter md hotkeys plugin. the bad news, that together with my plugin (or when already having content in the code block in general) it still adds the line breaks, creating unnecessary line breaks you have to remove manually again.

Screen.Recording.2022-01-23.at.23.05.58.mov

context awareness

When starting a code block with auto pair markdown syntax disabled, I first type

```

The suggestions show up as expected. To close the code block, I have to type it again. This time, it also shows the suggestions and I have to exit them with Esc. It would be great if it checked whether there was something with this form

```<some-lang>

before it and wouldn't show the suggester. That shouldn't make the Regex more difficult, but would warrant another regex check once the three backticks have triggered it.

const match = sub.match(/^```(.*)$/)?.[1];
if (match !== undefined) {
return {
start: {
ch: sub.lastIndexOf(match),
line: cursor.line,
},
end: cursor,
query: match,
};
}
return null;
}

Add option to remove plugin(s)

Thank you for the plugin! Means I actually remember what codeblocks I can use sometimes!

Admonitions are most of my suggestions, but I never use codeblock admonitions. It'd be convenient to be able to hide those suggestions.

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.