Git Product home page Git Product logo

codemirror-indentation-markers's People

Contributors

alex-4ed5ec60d avatar bradymadden97 avatar colehoward avatar dependabot[bot] avatar ethan-vanderheijden avatar hrjakobsen avatar lunaroyster avatar majeekg avatar mattmundell avatar sergeichestakov avatar timdown 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  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  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

codemirror-indentation-markers's Issues

Suggestion: remove indent on blank lines

Hi,

Assuming you have a document in markdown like:

- one
  - two
  - three

four
five

The plugin draws a line on first four lines, which doesn't look good.

I found a quick fix to hide line in blank lines after the indent by adding that to my theme:

 "span span.cm-indentation-marker": {
      display: "none",
    },

Maybe you'll find it useful and add it to the code as a default :) (or do it in some nicer way than ugly CSS hack ;) )

Cursor at independent statement after block highlights previous block in Python

As shown below, when the cursor is at a statement after a block (print below), the previous block (the if block below) seems to still be highlighted as the active block, which is not expected. If a blank line is inserted above print, then the outer block is highlighted when the cursor is at print as expected.

I understand that some of the detection logic may be upstream, so I'm not sure if this is the right place to file this issue.

image

Indentation markers are off some times

I'm currently exploring hooking up this plugin to Chrome DevTools by default (as requested in crbug/1479986). However testing this a on a bunch of files, in some cases (for example the proxy.js file in the coffee-cart.netlify.app test app) the indentation seems off by 1 or 2 levels.

image

Suggestion: Improving Indentation Guides to Reflect Scope More Intuitively

Hi Everyone,
I noticed that the indentation guides extend to the end of the enclosing scope, even if there's no code in the additional lines. This approach is valid, but it differs from the behavior of other common editors like VS Code.

I propose adjusting the indentation guides to terminate at the last line of code within a scope. I believe this subtle adjustment could provide a cleaner and more intuitive visual representation of code structure.

A Couple Examples:

Before:

class Foo:
|   def __init__(self, bars):
|   |   self.bars = []
|   |   if bars:
|   |   |   self.bars = bars
|   |   |
|   |   |
|   def print_bars(self):
|   |   for element in self.bars:
|   |   |    print(element)
|   |   |
|   |   |
...

After:

class Foo:
|   def __init__(self, bars):
|   |   self.bars = []
|   |   if bars:
|   |   |   self.bars = bars
|       
|       
|   def print_bars(self):
|   |   for element in self.bars:
|   |   |    print(element)


...

And then for languages that use curly braces, it would better represent the scope of the code even if the brackets aren't properly formatted:

Before:

if (true){
|   doSomething()}
|
|
...

After:

if (true){
|   doSomething()}

...

Question

  • Would this change be in line with the goals and direction of the project?

If there's any interest, I can go ahead and make a pull request. It's a pretty easy change.

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.