-
Notifications
You must be signed in to change notification settings - Fork 537
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
Dev Env Tweaks #156
Dev Env Tweaks #156
Conversation
This works for all JavaScript envs, including React and others
install/select-dev-env.sh
Outdated
@@ -9,10 +9,16 @@ for language in $languages; do | |||
;; | |||
Node.js) | |||
mise use --global node@lts | |||
|
|||
# Enable the extras plugins in NeoVim | |||
jq '.extras |= (. + ["lazyvim.plugins.extras.lang.typescript"] | unique)' ~/.config/nvim/lazyvim.json >tmp.json && mv tmp.json ~/.config/nvim/lazyvim.json |
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.
Nice!
install/select-dev-env.sh
Outdated
jq '.extras |= (. + ["lazyvim.plugins.extras.lang.php"] | unique)' ~/.config/nvim/lazyvim.json >tmp.json && mv tmp.json ~/.config/nvim/lazyvim.json | ||
|
||
# Configure PHP's LSP to use intelephense instead of phpactor (default) | ||
if ! grep -q 'php_lsp' ~/.config/nvim/lua/config/options.lua; then |
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.
Nice!
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.
Seems good to me. The only thing I would change is create a temporary file using mktemp
and possibly a tiny refactor to re-use the mv $OMAKUB_LAZYVIM_TMP ~/.config/nvim/lazyvim.json
at the end of the switch, since this seems to be a common statement in most of the cases anyway.
Using mktemp
should ensure that we get a fresh clean file every time and there don't somehow end up using a corrupt or bad tmp.json
(think other programs, or aborted executions).
OMAKUB_LAZYVIM_TMP=$(mktemp /tmp/omakub.XXXXXX)
...
rm "$OMAKUB_LAZYVIM_TMP"
@tonysm |
@Kasui92 ahh, I thought I was the only one wanting this. 😅 Gonna submit another PR tonight then |
@tonysm TY! |
Changed