diff options
| -rw-r--r-- | .config/nvim/init.lua | 14 | ||||
| -rw-r--r-- | .zshrc | 59 |
2 files changed, 64 insertions, 9 deletions
diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua index f581eea..c836139 100644 --- a/.config/nvim/init.lua +++ b/.config/nvim/init.lua @@ -94,8 +94,6 @@ require("conform").setup({ }) - -local lspconfig = require("lspconfig") local capabilities = require("cmp_nvim_lsp").default_capabilities() local servers = { @@ -103,16 +101,21 @@ local servers = { html = {}, ts_ls = {}, cssls = {}, + bashls = { filetypes = { "sh", "zsh" }, }, + clangd = { cmd = { "clangd", "--compile-commands-dir=." }, }, + lua_ls = { settings = { Lua = { - diagnostics = { globals = { "vim" } }, + diagnostics = { + globals = { "vim" }, + }, }, }, }, @@ -120,9 +123,10 @@ local servers = { for server, config in pairs(servers) do config.capabilities = capabilities - lspconfig[server].setup(config) -end + vim.lsp.config(server, config) + vim.lsp.enable(server) +end local cmp = require("cmp") @@ -5,8 +5,8 @@ setopt incappendhistory setopt interactivecomments HISTFILE=~/.zsh_history -HISTSIZE=5000 -SAVEHIST=5000 +HISTSIZE=10000 +SAVEHIST=10000 bindkey -v export KEYTIMEOUT=1 @@ -48,13 +48,13 @@ alias pdf='sioyek' alias wiki='wikiman' alias lg='lazygit' alias blue='bluetui' -alias wifi='impala' +alias op='xdg-open' +alias open='xdg-open' bindkey -M vicmd 'jj' vi-cmd-mode bindkey -M viins 'jj' vi-cmd-mode - function zle-keymap-select { if [[ $KEYMAP == vicmd ]]; then echo -ne "\e[1 q" @@ -100,3 +100,54 @@ export QT_QPA_PLATFORM=wayland export PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:$HOME/cli/sf/bin:$HOME/.platformio/penv/bin:$HOME/scripts" . "$HOME/.local/bin/env" + +# _fzf_search() { +# local base_dir=$1 +# local type=$2 +# local mode=$3 +# +# if [[ "$mode" == "ripgrep" ]]; then +# local res=$(rg --column --line-number --no-heading --color=always --smart-case "" "$base_dir" | \ +# fzf --ansi --delimiter : --preview 'bat --style=numbers --color=always --highlight-line {2} {1}') +# [[ -n "$res" ]] && nvim $(echo $res | cut -d: -f1) +$(echo $res | cut -d: -f2) +# else +# local res=$(fd --type "$type" . "$base_dir" | fzf --preview '[[ -d {} ]] && eza -T {} || bat --color=always {}') +# if [[ -n "$res" ]]; then +# if [[ "$type" == "d" ]]; then +# cd "$res" +# else +# nvim "$res" +# fi +# fi +# fi +# zle reset-prompt +# } +# +# fzf_here_f() { _fzf_search . f } +# fzf_here_d() { _fzf_search . d } +# fzf_here_rg() { _fzf_search . "" ripgrep } +# fzf_home_f() { _fzf_search ~ f } +# fzf_home_d() { _fzf_search ~ d } +# fzf_home_rg() { _fzf_search ~ "" ripgrep } +# fzf_root_f() { _fzf_search / f } +# fzf_root_g() { _fzf_search / d } +# +# zle -N fzf_here_f +# zle -N fzf_here_d +# zle -N fzf_here_rg +# zle -N fzf_home_f +# zle -N fzf_home_d +# zle -N fzf_home_rg +# zle -N fzf_root_f +# zle -N fzf_root_g +# +# bindkey '^j' fzf_here_f +# bindkey '^g' fzf_here_d +# bindkey '^k' fzf_here_rg +# +# bindkey '^@j' fzf_home_f +# bindkey '^@g' fzf_home_d +# bindkey '^@k' fzf_home_rg +# +# bindkey '^[^@j' fzf_root_f +# bindkey '^[^@g' fzf_root_g |