Giter Club home page Giter Club logo

nl-syntax-highlighting's People

Contributors

artisticat1 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  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

nl-syntax-highlighting's Issues

Metadata inspired activation

As a user i would like to only enable syntax highlighting on files of my choosing.
I only want my fiction to be highlighted and not my bullet point style note taking notes.

I propose a setting called:

Metadata Only Per File Activation No [ [|||||]-----] Yes
(NL-SYNTAX-HL: "all")

Only files with the correct metadata field will be highlighted (user opt-in)

(i'm willing to work on this)

FR: Tooltips?

When I turned this on I didn't have a mapping in my mind established for each color — so maybe this is NOT worth implementing and instead I should simply use the plugin a bit more.

This is my initial stab at this in my snippets.css

.adjective:before {
  content: "adjective";
}

.noun:before {
  content: "noun";
}

.adverb:before {
  content: "adverb";
}

.verb:before {
  content: "verb";
}

.conjunction:before {
  content: "conjunction";
}

.adjective:before,
.noun:before,
.adverb:before,
.verb:before,
.conjunction:before {
  position: absolute;
  top: -24px;
  left: 0;
  width: auto;
  padding: 2px 8px;
  border-radius: 4px;
  background: #000;
  color: #fff;
  opacity: 0.7;
  text-align: center;
  display: none;
}

.adjective:hover:before,
.noun:hover:before,
.adverb:hover:before,
.verb:hover:before,
.conjunction:hover:before {
  display: block
}

FR: Use user colour definitions

By default, it picks the iA colours for this feature. Realistically it should probably use the obsidian --color-* colour definitions which will ensure it stays more in keeping with the user's theme.

Love the plugin by the way!

Performance lag when backspacing

I have 16 plug-ins that load (recently started using). When I turned on the Natural Language Syntax Highlighter plugin, the screen was distracting and "busy" with too many colors. Instead of turning the plugin off or removing the plugin, I turned the colors off for the different word types. This was several days ago.

Additional observation, I did not notice any performance lag until this morning, and I have been using Obsidian a fair bit since then.

Here is the output from my performance file. At least that is what I think it is.
Trace-20231123T090012.json

FR: Disable plugin within certain folders / paths

Thank you so much for this plugin, it's excellent!

Many other Obsidian plugins offer an option to include or exclude (depending on the plugin) certain folders from the functionality. I personally find that I love this plugin for composing notes but for my Daily notes, which I use more tactically to get things done, I would prefer not to see the highlighting.

FR: Global toggle command

It would be great to be able to toggle this globally as it isn't always feasible to add a frontmatter field to turn this on.

Multi Language support?

Can i use this for text of two different languages at once?
For example:
German text
English translation below

Ich bin mit dem Fahrrad Nachhause gefahren
I drove with the bicycle home

Bug: Type-error reading `wordsToOverrideDict`

for some reasons, I do not get any highlighting at all. I looked in the console and saw this error:

app.js:1 TypeError: Cannot read properties of undefined (reading 'wordsToOverrideDict')
    at getDecosOnLine (plugin:nl-syntax-highlighting:16511:53)
    at getAllDecosByLine (plugin:nl-syntax-highlighting:16481:21)
    at new import_view.ViewPlugin.fromClass.decorations (plugin:nl-syntax-highlighting:16536:30)
    at e.create (app.js:1:350672)
    at e.update (app.js:1:351102)
    at e.ensureHandlers (app.js:1:378274)
    at e.updatePlugins (app.js:1:443716)
    at e.update (app.js:1:441962)
    at e._dispatch (app.js:1:438758)
    at e.dispatch (app.js:1:440536)

I tried using the plugin with the setting "Words to override" empty and filled with the example entries, in both cases I get the same error above.

FR: Allow other languages than english

I am a German guy and I write nearly all of my notes in German. I think it would helpful for a lot of people to be able to switch to the most common languages (using different language models for POS tagging in the background)

Bug: Do not apply to yaml frontmatter or code blocks

Right now, the Natural Language Syntax Highlighting is applied to the yaml frontmatter and code blocks as well, even though those are two areas where users most likely do not want to have NL Highlighting.

edit: also, tags also get highlighted.

Agregar idioma español

Seria muy útil y necesario para los usuarios que escriben en español tener la alternativa de su idioma.

Ignore text in code blocks

Right now the text inside code blocks is processed and highlighted.

This is VERY confusing when handling vaults with lots of code snippets:

image

It would be useful to have a switch in the configuration to toggle this behaviour ON and OFF.

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.