-
-
Notifications
You must be signed in to change notification settings - Fork 272
WIP: Next #666
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@groteworld Looking at eda3a8a there is still a Gratipay reference in the README at the bottom. Also you can register a |
|
@jrappen not sure this PR is the place for this discussion, but I'll remove it from the README too. |
|
@pykong Your changes from 8bc595a do not address |
|
I'm not sure what you mean. > 3148 We don't create color schemes at all anymore, instead we fully rely on scopes already available in a given color scheme (or the region.colorish scopes). < 3148 hidden tmTheme files are created. |
|
Glad to see changes happening to SublimeLinter. This opportunity should probably be used to solve the awkward situation of Python linters being evaluated within the built-in environment, which causes various issues and is generally quite hack with any version that is not 3.3. I don't think there is an issue for this yet, but it's been a while since I last looked for one. This has been on my list for a while now, but I won't be able to file a proper issue until Sunday. |
|
While definitely something is happening, we’re mosty attacking the UI. The entirety of SublimeLinter needs attention and the issue you point out is one of them. We could definitely use some help in that area, so if anyone wants to open a PR that’d be very welcome. |
|
I can imagine that help is always welcome, but I'm unable to provide it here currently. There are just too many things I'm dingbat already. |
|
*doing. Thanks autocorrect and thanks github for making editing comments on mobile a pain. |
|
Yes, dingbat is most likely to be the word you were looking for 😀 Just taking a peek at it and having some feedback is also good! |
|
Seems to ok for me with just one issue: Please add more granularity to the default style scopes. Specifically a namespace, but also add types to the scopes. The reason is to allow color schemes to enhance support specifically for the plugin, because while a color scheme can define styles for the colorish regions it may want to do something specific for a plugin. I've already talked elsewhere on this so I'm not going to rehash it all. I recommend postfixing a namespace so that color schemes can do this: Appending it may cause potential issues later. Postfixing is more powerful. Also add types but I suggest not coupling it to the namespace for the most flexibility: One other thing that would be nice is to differentiate between debug and verbose for plugin debug messages and lint warnings. For example when you enable debug mode you get messages like: I often want to see those messages because I want to lookup the error code (there's probably several features in there). Enabling debug mode gives too much noise really all you want is verbose linting information. PS. I've tested against Python and PHP (there's an open pr for 7.2 support). --- edit --- I suspect allowing the scope to be configurable is going to cause problems. I can't see a use case. |
|
Error codes are within the domain of plugins. SublimeLinter-flake8 has an option for this, for example (though imo it should be enabled by default). Regarding more specific scopes, what about prefixing the sublimelinter scope? |
|
You’ll be able to view a list of errors per line but hovering over the gutter, and there are report options already in place. The console is not the place for such features, so we definitely won’t be enhancing the logging options there. I need to check how it works, but if I’m right we’re already baking in a scope that will allow you to target the highlights from a color scheme. I don’t think you want users to have to “fight” against a color scheme just to get the colors they want. Region.colorish is already in hands of the color scheme, as are things like markup.error. A color scheme can advertise to the user which scopes are suitable for linter highlights, but we’re explicitly putting this in the hands of users. This will allow them to differentiate between different linters in a single file, which is one of the most frequently recurring feature requests. A color scheme cannot reasonably provision for such situations. |
| The tools menu now only lists the clear_cache command. | ||
| Commands are now named sublime_linter_* to comply with naming conventions. | ||
|
|
||
| Commands to change settings or toggle linters have been removed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about the situation when you want to have a linter disabled by default but enable it for certain projects only?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, nothing about the enabled/disabled settings has changed, just the command has been removed. You can enable linters in project settings or in sublimelinterrc files.
Edit: all the command did was enable/disable a linter globally. If you want to replicate this, you can simply use package control to disable/enable the specific linter plugin.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, didn't read this correctly. All good then.
|
Sorry for bothering you, but I'd like to try your work. I've been trying but without success. STR:
|
|
@darkred Thanks for your interest in the next SublimeLinter. The current commit is not working, as it serves as a backup push. Your error log implies a problem with the settings conversion. @braver |
You mean instead of That doesn't work. The reason it doesn't work is because the scopes at the end are more specific and whatever is defined last wins. It's easier to understand by looking at what problem is being solved. Let's say plugin sets a The color scheme wants to provide specific styles for the Great. The color scheme has progressively enhanced the redish region colors. But that style is now set for all redish regions. That means all plugins that use the redish regions get that style. That's not bad. That's good. That's what the color scheme wants. However, it wants a slightly different style for sublimelinter. Prefixing won't work i.e. We might not be done yet. The above style is great. It specifically targets the sublimelinter plugin redish regions. But SL might use redish region for several different elements. Let's imagine a plugin used redish regions for both warnings and errors (as a simple easy to understand example). The color scheme can now control all the elements.
I'm disappointed. Putting it in the hands of the users is useless. Allowing schemes to progressively enhance the colors of the scheme doesn't take anything away from the user. They still have full control. Allowing color schemes control (without taking it away from the user) enhances users experience without having to ask them to do anything. |
|
@pykong Thank you for the help: with the latest functional commit and an empty settings So I'll just wait for the next release 👍 |
|
@darkred You are welcome. What type of exceptions do |
If a view file gets reloaded and has hard syntax errors we never actually subscribed, and a subsequent unsubscribe would fail.
|
Edit: assuming you're talking about the statusbar busy/linting... indicator. I think it needs the clarification of what's going on because it's detached from context and you hopefully don't see it a lot. Perhaps we should make all of it configurable so everyone can make it to their taste, or we should have a shared "busy" indicator like they do in Atom. Things can always be improved but we might not always agree on how to do so. |
[beta] Fix bug in match dictionary
* Since the RegionStore is only used within this module and as a singleton, we can keep it local. * We had two identical and *static* 'clear' methods. Moved to a normal function 'clear_view'. * The two 'reset' methods were unused. Removed.
Generally, our data is (0, 0) based. We inc (line:col) by one for the user. Fixes #768
Explicitly test for None'ness and let zeros pass
Cleanup status bar view - Fixup #762
Fixes #767 This is really similiar to how `highlight.full_line()` works.
Region keys must be unique per view, so a set is the natural type here. By doing that I found that we actually use PROTECTED_REGIONS_KEY twice per draw. So, instead of using a set, I kept the list and check if we actually hold the promise to keep the keys unique.
Replacement for the new queue
Small refactor in highlight
Translate columns when linting using selectors
Since we have a good signal when views actually get unreachable, we just use that `on_pre_close` to trigger a clearance.
Implement simple cleanup for the queue
|
Ok, it's clear we won't do anything in SL3 anymore, and if we do we can always branch out again. I'm going to merge this behemoth, it'll make a couple of things easier to manage. |
|
😭 I will miss you, branch. |
|
Yeah, it was a pretty good branch... 👋🏻 |

A PR to track a possible upcoming (pre)-release where we combine some new features with a bunch of cleaning up.
Most of the work done by @pykong at PR #665 (closed)
fixes #662, #661, #649, #639, #619, #618, #609, #274, #292, #299, #569, #663, #279, #348, #394, #457, #460, #461, #524, #557, #570, #452, #212, #115,
The number of this PR should tell you something 🤘
Open issues:
Bugs
Refactoring:
check if end col number is correctfixedCode quality review, including:
force_xml_schemeoption[]lint on load/startup in background mode
Error panel
show only start col?yesselectoptionbase_dirfinderCommands and Keybindings
should internal commands be named by a different scheme, for encapsulation?not necessaryeventually unified key binding file for all platforms?can't be done and there shouldn't be many bindings anywaybackup old user settings on upgrade
update docs
next/previous error crashes ST (3154)
In settings: styles -> After entering a scope that isn't in the current color scheme (e.g.
bla), it will complain about every next change even if you enter a valid scope.After every change, all highlights are removed and then restored, making them "blink" under certain circumstances.
singular/plural in-line report
check GitGutter gutter hover interop
changing gutter themes seems to be broken
all default settings are copied to the user settings
check if disabling linters still works
can not focus panel
error when user settings file doesn't exist (thanks @darkred for finding this!)
Some core issues we want to register:
inconsistent type when set vs get to settingsFeature requests:
Report (Open Files)andShow All Errorswith an output panel, like the one in LSP. Will fix list errors in an output panel #115 and Passive Warnings Setting Per Linter #212We could consider dropping the new line report popup in favour of these two features, but it's ok to first try and see how it feels and then decide. I think reporting per line isn't all that natural, but perhaps that depends on the linters you're using.