Skip to content

Commit

Permalink
Simplify node/npm/fnm configuration and install language servers
Browse files Browse the repository at this point in the history
Also, simplify some configurations regarding
Zsh/Bash and HOME references.
  • Loading branch information
schneiderfelipe committed Nov 15, 2022
1 parent 274cfbe commit 40225e8
Show file tree
Hide file tree
Showing 10 changed files with 141 additions and 246 deletions.
11 changes: 7 additions & 4 deletions .bash_after
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
# ~/.bash_aliases, instead of adding them to ~/.bashrc directly.
# See /usr/share/doc/bash-doc/examples in the bash-doc package.

if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
if [ -f "$HOME/.bash_aliases" ]; then
. "$HOME/.bash_aliases"
fi

# Preferred editor for local and remote sessions
Expand Down Expand Up @@ -38,7 +38,7 @@ export FZF_DEFAULT_OPTS="$FZF_DEFAULT_OPTS \
--color='marker:#fc9867,spinner:#bcef8a,header:#fc9867'"

# Set up Broot
source /home/schneider/.config/broot/launcher/bash/br
source $HOME/.config/broot/launcher/bash/br

# Options for Multiwfn and xTB
export OMP_STACKSIZE=200M
Expand All @@ -48,13 +48,16 @@ export OMP_STACKSIZE=200M
. "$HOME/.cargo/env"

# Set up Haskell environment
[ -f "/home/schneider/.ghcup/env" ] && source "/home/schneider/.ghcup/env"
[ -f "$HOME/.ghcup/env" ] && source "$HOME/.ghcup/env"

# Correct errors in previous console commands
eval "$(thefuck --alias)"

# Generated for envman. Do not edit.
[ -s "$HOME/.config/envman/load.sh" ] && source "$HOME/.config/envman/load.sh"

# Set up fnm environment
eval "$(fnm env --use-on-cd --version-file-strategy=recursive)"

# Last thing of this file, starship
eval "$(starship init zsh)"
13 changes: 6 additions & 7 deletions .bash_before
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,12 @@ if ! command -v pyenv &> /dev/null; then
fi
eval "$(pyenv init -)"

# juliaup configuration
export PATH=$HOME/.juliaup/bin:$PATH

# You might have to change your $PATH.
# We update $PATH first, as code down the road relies on it.
export PATH=~/.local/bin:$PATH
export PATH=$HOME/.local/bin:$PATH

# Alda binaries
export PATH=/opt/alda:$PATH
Expand All @@ -34,12 +37,8 @@ export PATH=$Multiwfnpath:$PATH
export GOPATH="$HOME/.go"
export PATH="$GOPATH/bin:/opt/go/bin:$PATH"

# fnm
export PATH=/home/schneider/.fnm:$PATH
eval "$(fnm env --use-on-cd)"

# npm installed packages
export PATH=~/.npm-global/bin:$PATH
# fnm/npm installed packages
export PATH=$HOME/.fnm:$PATH

# Before anything else, start tmux
if command -v tmux &> /dev/null && [ -z "$TMUX" ] &&
Expand Down
2 changes: 1 addition & 1 deletion .bash_completion/poetry
Original file line number Diff line number Diff line change
Expand Up @@ -197,4 +197,4 @@ _poetry_596bbf7c262849f4_complete()
}

complete -o default -F _poetry_596bbf7c262849f4_complete poetry
complete -o default -F _poetry_596bbf7c262849f4_complete /home/schneider/.local/share/pypoetry/venv/bin/poetry
complete -o default -F _poetry_596bbf7c262849f4_complete ~/.local/share/pypoetry/venv/bin/poetry
28 changes: 6 additions & 22 deletions .bashrc
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,10 @@

# Things shared between bash and zsh that should come before.
# This includes changes to $PATH.
if [ -f ~/.bash_before ]; then
. ~/.bash_before
if [ -f "$HOME/.bash_before" ]; then
. "$HOME/.bash_before"
fi

# >>> juliaup initialize >>>

# !! Contents within this block are managed by juliaup !!

case ":$PATH:" in *:/home/schneider/.juliaup/bin:*) ;; *)
export PATH=/home/schneider/.juliaup/bin${PATH:+:${PATH}}
;;
esac

# <<< juliaup initialize <<<

# If not running interactively, don't do anything
[ -z "$PS1" ] && return

Expand Down Expand Up @@ -96,18 +85,13 @@ esac
#fi

# Completions
source ~/.bash_completion/alacritty
source ~/.bash_completion/poetry

# Completions for fzf
source /usr/share/doc/fzf/examples/key-bindings.bash
source /usr/share/doc/fzf/examples/completion.bash
source $HOME/.bash_completion/alacritty

# Smarter cd command
eval "$(zoxide init bash)"

# Things shared between bash and zsh that should come after.
# This includes almost all exports and aliases.
if [ -f ~/.bash_after ]; then
. ~/.bash_after
fi
if [ -f "$HOME/.bash_after" ]; then
. "$HOME/.bash_after"
fi
193 changes: 97 additions & 96 deletions .config/Code/User/settings.json
Original file line number Diff line number Diff line change
@@ -1,97 +1,98 @@
{
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.fontFamily": "'JetBrainsMono Nerd Font', 'Droid Sans Mono', 'monospace', monospace",
"editor.fontLigatures": true,
"editor.formatOnPaste": true,
"editor.formatOnSave": true,
"editor.formatOnSaveMode": "modificationsIfAvailable",
"editor.formatOnType": true,
"editor.inlineSuggest.enabled": true,
"editor.lineNumbers": "relative",
"editor.minimap.renderCharacters": false,
"editor.minimap.showSlider": "always",
"editor.minimap.size": "fill",
"editor.wordWrap": "off",
"prettier.tabWidth": 4,
"workbench.colorTheme": "One Monokai",
"github.copilot.enable": {
"*": true,
"markdown": true,
"plaintext": true,
"yaml": true
},
"go.toolsManagement.autoUpdate": true,
"python.analysis.typeCheckingMode": "strict",
"python.formatting.provider": "black",
"python.linting.mypyEnabled": true,
"python.linting.prospectorEnabled": true,
"python.testing.pytestEnabled": true,
"julia.NumThreads": 6,
"julia.enableCrashReporter": true,
"julia.enableTelemetry": true,
"julia.symbolCacheDownload": true,
"terminal.integrated.commandsToSkipShell": ["language-julia.interrupt"],
"html.format.indentHandlebars": true,
"html.format.indentInnerHtml": true,
"html.format.templating": true,
"latex-workshop.bibtex-fields.sort.enabled": true,
"latex-workshop.bibtex-format.sort.enabled": true,
"latex-workshop.bibtex-format.trailingComma": true,
"latex-workshop.latex.autoBuild.run": "never",
"latex-workshop.latex.autoClean.run": "onFailed",
"latex-workshop.linting.chktex.enabled": true,
"latex-workshop.linting.delay": 1000,
"latex-workshop.texcount.autorun": "onSave",
"ltex.additionalRules.enablePickyRules": true,
"ltex.additionalRules.motherTongue": "pt-BR",
"ltex.completionEnabled": true,
"quarto.mathjax.theme": "dark",
"quarto.render.previewType": "external",
"quarto.render.renderOnSave": true,
"svelte.enable-ts-plugin": true,
"svelte.plugin.svelte.defaultScriptLanguage": "ts",
"svelte.plugin.svelte.format.config.singleQuote": true,
"svelte.plugin.svelte.format.config.svelteStrictMode": true,
"svelte.plugin.svelte.note-new-transformation": false,
"svelte.plugin.svelte.useNewTransformation": true,
"tailwindCSS.emmetCompletions": true,
"tailwindCSS.includeLanguages": {
"svelte": "html"
},
"files.associations": {
"*.css": "tailwindcss"
},
"[rust]": {
"editor.defaultFormatter": "rust-lang.rust-analyzer"
},
"[go]": {
"editor.defaultFormatter": "golang.go"
},
"[go.mod]": {
"editor.defaultFormatter": "golang.go"
},
"[go.sum]": {
"editor.defaultFormatter": "golang.go"
},
"[python]": {
"editor.defaultFormatter": "ms-python.python"
},
"[julia]": {
"editor.defaultFormatter": "julialang.language-julia"
},
"[latex]": {
"editor.defaultFormatter": "James-Yu.latex-workshop"
},
"[bibtex]": {
"editor.defaultFormatter": "James-Yu.latex-workshop"
},
"[markdown]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[html]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[svelte]": {
"editor.defaultFormatter": "svelte.svelte-vscode"
}
}
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.fontFamily": "'JetBrainsMono Nerd Font', 'Droid Sans Mono', 'monospace', monospace",
"editor.fontLigatures": true,
"editor.formatOnPaste": true,
"editor.formatOnSave": true,
"editor.formatOnSaveMode": "modificationsIfAvailable",
"editor.formatOnType": true,
"editor.inlineSuggest.enabled": true,
"editor.lineNumbers": "relative",
"editor.minimap.renderCharacters": false,
"editor.minimap.showSlider": "always",
"editor.minimap.size": "fill",
"editor.wordWrap": "off",
"prettier.tabWidth": 4,
"workbench.colorTheme": "One Monokai",
"github.copilot.enable": {
"*": true,
"markdown": true,
"plaintext": true,
"yaml": true
},
"go.toolsManagement.autoUpdate": true,
"python.analysis.typeCheckingMode": "strict",
"python.formatting.provider": "black",
"python.linting.mypyEnabled": true,
"python.testing.pytestEnabled": true,
"julia.NumThreads": 6,
"julia.enableCrashReporter": true,
"julia.enableTelemetry": true,
"julia.symbolCacheDownload": true,
"terminal.integrated.commandsToSkipShell": [
"language-julia.interrupt"
],
"html.format.indentHandlebars": true,
"html.format.indentInnerHtml": true,
"html.format.templating": true,
"latex-workshop.bibtex-fields.sort.enabled": true,
"latex-workshop.bibtex-format.sort.enabled": true,
"latex-workshop.bibtex-format.trailingComma": true,
"latex-workshop.latex.autoBuild.run": "never",
"latex-workshop.latex.autoClean.run": "onFailed",
"latex-workshop.linting.chktex.enabled": true,
"latex-workshop.linting.delay": 1000,
"latex-workshop.texcount.autorun": "onSave",
"ltex.additionalRules.enablePickyRules": true,
"ltex.additionalRules.motherTongue": "pt-BR",
"ltex.completionEnabled": true,
"quarto.mathjax.theme": "dark",
"quarto.render.previewType": "external",
"quarto.render.renderOnSave": true,
"svelte.enable-ts-plugin": true,
"svelte.plugin.svelte.defaultScriptLanguage": "ts",
"svelte.plugin.svelte.format.config.singleQuote": true,
"svelte.plugin.svelte.format.config.svelteStrictMode": true,
"svelte.plugin.svelte.note-new-transformation": false,
"svelte.plugin.svelte.useNewTransformation": true,
"tailwindCSS.emmetCompletions": true,
"tailwindCSS.includeLanguages": {
"svelte": "html"
},
"files.associations": {
"*.css": "tailwindcss"
},
"[rust]": {
"editor.defaultFormatter": "rust-lang.rust-analyzer"
},
"[go]": {
"editor.defaultFormatter": "golang.go"
},
"[go.mod]": {
"editor.defaultFormatter": "golang.go"
},
"[go.sum]": {
"editor.defaultFormatter": "golang.go"
},
"[python]": {
"editor.defaultFormatter": "ms-python.python"
},
"[julia]": {
"editor.defaultFormatter": "julialang.language-julia"
},
"[latex]": {
"editor.defaultFormatter": "James-Yu.latex-workshop"
},
"[bibtex]": {
"editor.defaultFormatter": "James-Yu.latex-workshop"
},
"[markdown]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[html]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[svelte]": {
"editor.defaultFormatter": "svelte.svelte-vscode"
}
}
2 changes: 1 addition & 1 deletion .gitconfig
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
status = auto
[init]
defaultBranch = main
templateDir = /home/schneider/.git-templates/git-secrets
templateDir = ~/.git-templates/git-secrets
[alias]
ignore = "!gi() { curl -sL https://www.gitignore.io/api/$@ ;}; gi"
[credential "https://github.com"]
Expand Down

0 comments on commit 40225e8

Please sign in to comment.