Comments (9)
It happens to the best of us 😊 ideally, the content of p42.toml
would get validated, and there would be syntax errors while editing, but that's a pretty lousy effort/value ratio, thus not a priority.
Regarding the user settings, I like your approach of having the project config override the user preferences way better than my original idea. That way, projects could easily enforce their settings. I'll see if I can get this implemented by the end of Jan.
from js-assistant.
Thank you for a useful tool, and looking forward to that settings feature.
I'm closing this a resolved 👍
from js-assistant.
That is so cool 👍 I just got the updated plug-in 😄
This is one of the more useful tools in the arsenal.
from js-assistant.
Thanks for the feedback.
The TOML configuration issue is a bug. I'll work on a fix today.
The VS Code settings are something I'm considering. However they can potentially conflict with the p42.toml
configuration, which is why I haven't added them yet. In particular, cases where a user has multiple workspaces and the p42.toml
(team/repository oconfiguration) sets certain refactorings true
in one workspace and false
in another, and the VS Code settings (user configuration) enables them in both (leading to issues in the workspace where they should be disabled).
My current is that there could be an enum with 3 settings in the configuration for each refactoring with suggestions:
- "always show"
- "never show"
- "configured in p42.toml (default)"
Would that work for your use case?
from js-assistant.
I just looked deeper into the p42.toml
configuration issue that you reported. While the configuration does not get immediately applied when you edit p42.toml
, it does refresh once the file is edited or reloaded. As a work-around, you can just (with the refactoring being disabled in the p42.toml
) add and remove a space in the file you are editing and the suggestions should update (in your case remove the hints for the numeric literals). Please let me know if that works for you. I'll implement a file watching mechanism for the p42.toml
meanwhile.
from js-assistant.
@trasherdk I've just released version 1.68.2. It automatically updates the hints in open editors when p42.toml
is saved. Please let me know if you still encounter the bug in version 1.68.2 or higher. Thanks again for the bug report!
from js-assistant.
@trasherdk I also noticed a small typo in your p42.toml
: the setting is called enabled
(not enable
).
from js-assistant.
Damn.. That's embarrassing 😊 A typo in the config.
So, it turns out, I was the bug.
It looks like extensions are auto updating, as I'm already on 1.68.2
and with the fixed typo all is good.
I would still love to see config in user settings, avoiding that p42.toml
file.
In the case where a project already has p42.toml
config, that config should override users personal preferences.
from js-assistant.
@trasherdk I've added the VS Code settings in 1.72.0
. Here is how it works now:
Thanks for the suggestion!
from js-assistant.
Related Issues (20)
- Support for Svelte components HOT 1
- Insert console.log for variable HOT 2
- Command Palette integration HOT 2
- Convert to destructuring assignment
- Create new file when extract React component
- convert-function-to-object-method potentially unsafe
- p42.ai is down HOT 2
- Refactor Idea: extract functions inside functions
- is the site https://p42.ai/ down? HOT 1
- Make P42 settings apply to remote and workspace, honour jsconfig/tsconfig settings
- provide setting to set default suggestion level
- provide setting to disable the codeActionsOnSave HOT 2
- TypeScript's built-in "inline variable" refactoring should be declared as an overlapping code assist HOT 1
- Feature Request: transform object property assignment to `defineProperty`
- Dependency Visualization - is it activated?
- webstorm support?
- "Toggle braces" not available if function returns `null`
- Issue with "import.meta" syntax
- Lots of language server crashing since a few days ago, stopped when I disabled this extension
- Is this project still maintained? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from js-assistant.