javascript
This commit is contained in:
parent
4ddd1a099b
commit
c4811368b2
|
@ -27,7 +27,6 @@
|
|||
~/.config/bspwm: bspwm
|
||||
~/.config/sxhkd: sxhkd
|
||||
~/.config/bin: scripts
|
||||
~/.config/wal: wal
|
||||
~/.config/picom.conf: picom/picom.conf
|
||||
~/.config/alacritty/alacritty.yml: alacritty/alacritty.yml
|
||||
~/.config/latexmk/latexmkrc: latexmk/latexmkrc
|
||||
|
@ -36,6 +35,7 @@
|
|||
~/.config/rofi: rofi
|
||||
~/.xinitrc: xinitrc
|
||||
~/.zshenv: zshenv
|
||||
~/.npmrc: npmrc
|
||||
~/.config/wallpapers: wallpapers
|
||||
~/.config/radare2/radare2rc: r2rizin/radare2rc
|
||||
~/.config/rizin/rizinrc: r2rizin/rizinrc
|
||||
|
|
4
npmrc
Normal file
4
npmrc
Normal 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
|
|
@ -7,6 +7,21 @@ local coq = require('coq')
|
|||
local lspstatus = require('lsp-status')
|
||||
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 = {
|
||||
sumneko_lua = {
|
||||
settings = {
|
||||
|
@ -39,7 +54,29 @@ local lsp_confs = {
|
|||
ccls = {},
|
||||
pyright = {},
|
||||
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 = {}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -18,6 +18,10 @@ return require('packer').startup({function(use)
|
|||
'mustache/vim-mustache-handlebars'
|
||||
}
|
||||
|
||||
use {
|
||||
'evanleck/vim-svelte'
|
||||
}
|
||||
|
||||
use {
|
||||
'tpope/vim-fugitive',
|
||||
config = function()
|
||||
|
|
|
@ -221,7 +221,7 @@ backend = "xrender";
|
|||
|
||||
# Enable/disable VSync.
|
||||
# vsync = false
|
||||
# vsync = true
|
||||
vsync = true
|
||||
|
||||
# Enable remote control via D-Bus. See the *D-BUS API* section below for more details.
|
||||
# dbus = false
|
||||
|
|
|
@ -9,7 +9,7 @@ setopt vi
|
|||
|
||||
alias gef='gdb --eval-command="source /usr/share/gef/gef.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 la='exa -lah --icons'
|
||||
alias ll='exa -lah --icons'
|
||||
|
|
2
zshenv
2
zshenv
|
@ -7,6 +7,8 @@ export XDG_DATA_HOME="$HOME"/.local/share
|
|||
export XDG_CACHE_HOME="$HOME"/.cache
|
||||
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 RUSTUP_HOME="$XDG_DATA_HOME"/rustup
|
||||
export CARGO_HOME="$XDG_DATA_HOME"/cargo
|
||||
|
|
Loading…
Reference in New Issue
Block a user