javascript

This commit is contained in:
EvilMuffinHa 2022-05-13 18:15:19 -04:00
parent 4ddd1a099b
commit c4811368b2
7 changed files with 51 additions and 4 deletions

View File

@ -27,7 +27,6 @@
~/.config/bspwm: bspwm ~/.config/bspwm: bspwm
~/.config/sxhkd: sxhkd ~/.config/sxhkd: sxhkd
~/.config/bin: scripts ~/.config/bin: scripts
~/.config/wal: wal
~/.config/picom.conf: picom/picom.conf ~/.config/picom.conf: picom/picom.conf
~/.config/alacritty/alacritty.yml: alacritty/alacritty.yml ~/.config/alacritty/alacritty.yml: alacritty/alacritty.yml
~/.config/latexmk/latexmkrc: latexmk/latexmkrc ~/.config/latexmk/latexmkrc: latexmk/latexmkrc
@ -36,6 +35,7 @@
~/.config/rofi: rofi ~/.config/rofi: rofi
~/.xinitrc: xinitrc ~/.xinitrc: xinitrc
~/.zshenv: zshenv ~/.zshenv: zshenv
~/.npmrc: npmrc
~/.config/wallpapers: wallpapers ~/.config/wallpapers: wallpapers
~/.config/radare2/radare2rc: r2rizin/radare2rc ~/.config/radare2/radare2rc: r2rizin/radare2rc
~/.config/rizin/rizinrc: r2rizin/rizinrc ~/.config/rizin/rizinrc: r2rizin/rizinrc

4
npmrc Normal file
View File

@ -0,0 +1,4 @@
prefix=${XDG_DATA_HOME}/npm
cache=${XDG_CACHE_HOME}/npm
tmp=${XDG_RUNTIME_DIR}/npm
init-module=${XDG_CONFIG_HOME}/npm/config/npm-init.js

View File

@ -7,6 +7,21 @@ local coq = require('coq')
local lspstatus = require('lsp-status') local lspstatus = require('lsp-status')
lspstatus.register_progress() lspstatus.register_progress()
local function find_repo_root(names)
local util = require("lspconfig.util")
local config = names.configfiles
for _, i in ipairs(config) do
local gitroot = util.root_pattern('.git')(i)
if gitroot then
for _, file in ipairs(config) do
if util.path.is_file(util.path.join(gitroot, file)) then
return gitroot
end
end
end
end
end
local lsp_confs = { local lsp_confs = {
sumneko_lua = { sumneko_lua = {
settings = { settings = {
@ -39,7 +54,29 @@ local lsp_confs = {
ccls = {}, ccls = {},
pyright = {}, pyright = {},
gopls = {}, gopls = {},
dartls = {} dartls = {},
tsserver = {
root_dir = find_repo_root({
configfiles = { "tsconfig.json", "jsconfig.json", "package.json" }
}),
},
eslint = {
root_dir = find_repo_root({
configfiles = { ".eslintrc", ".eslintrc.js", "package.json" }
}),
on_new_config = function (config, new_root_dir)
local default_config = require('lspconfig.server_configurations.eslint').default_config
default_config.on_new_config(config, new_root_dir)
local util = require('lspconfig.util')
local pnp_cjs = util.path.join(new_root_dir, '.pnp.cjs')
local pnp_js = util.path.join(new_root_dir, '.pnp.js')
if util.path.exists(pnp_cjs) or util.path.exists(pnp_js) then
config.cmd = { 'yarn', 'exec', unpack(default_config.cmd) }
end
end
},
svelte = {}
} }

View File

@ -18,6 +18,10 @@ return require('packer').startup({function(use)
'mustache/vim-mustache-handlebars' 'mustache/vim-mustache-handlebars'
} }
use {
'evanleck/vim-svelte'
}
use { use {
'tpope/vim-fugitive', 'tpope/vim-fugitive',
config = function() config = function()

View File

@ -221,7 +221,7 @@ backend = "xrender";
# Enable/disable VSync. # Enable/disable VSync.
# vsync = false # vsync = false
# vsync = true vsync = true
# Enable remote control via D-Bus. See the *D-BUS API* section below for more details. # Enable remote control via D-Bus. See the *D-BUS API* section below for more details.
# dbus = false # dbus = false

View File

@ -9,7 +9,7 @@ setopt vi
alias gef='gdb --eval-command="source /usr/share/gef/gef.py"' alias gef='gdb --eval-command="source /usr/share/gef/gef.py"'
alias pwndbg='gdb --eval-command="source /usr/share/pwndbg/gdbinit.py"' alias pwndbg='gdb --eval-command="source /usr/share/pwndbg/gdbinit.py"'
alias wget='wget --hsts-file="$XDG_CACHE_HOME/wget-hsts"' alias wget='wget --hsts-file="$XDG_DATA_HOME/wget-hsts"'
alias neofetch='neofetch --kitty $XDG_CONFIG_HOME/neofetch/$(hostname).png --size 400px' alias neofetch='neofetch --kitty $XDG_CONFIG_HOME/neofetch/$(hostname).png --size 400px'
alias la='exa -lah --icons' alias la='exa -lah --icons'
alias ll='exa -lah --icons' alias ll='exa -lah --icons'

2
zshenv
View File

@ -7,6 +7,8 @@ export XDG_DATA_HOME="$HOME"/.local/share
export XDG_CACHE_HOME="$HOME"/.cache export XDG_CACHE_HOME="$HOME"/.cache
export CHROME_EXECUTABLE=$(which chromium) export CHROME_EXECUTABLE=$(which chromium)
export GRADLE_USER_HOME="$XDG_DATA_HOME"/gradle
export _JAVA_OPTIONS=-Djava.util.prefs.userRoot="$XDG_CONFIG_HOME"/java
export ZDOTDIR=~/.config/zsh export ZDOTDIR=~/.config/zsh
export RUSTUP_HOME="$XDG_DATA_HOME"/rustup export RUSTUP_HOME="$XDG_DATA_HOME"/rustup
export CARGO_HOME="$XDG_DATA_HOME"/cargo export CARGO_HOME="$XDG_DATA_HOME"/cargo