updates for headless server
This commit is contained in:
parent
d66226015b
commit
aee457eb35
@ -1,3 +1,5 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
# If not running interactively, don't do anything
|
# If not running interactively, don't do anything
|
||||||
case $- in
|
case $- in
|
||||||
*i*) ;;
|
*i*) ;;
|
||||||
@ -28,6 +30,12 @@ shopt -s checkwinsize
|
|||||||
# colored GCC warnings and errors
|
# colored GCC warnings and errors
|
||||||
export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'
|
export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'
|
||||||
|
|
||||||
|
# Add some custom keybinds
|
||||||
|
|
||||||
|
bind '"\C-o":"lfcd\n"'
|
||||||
|
bind '"\C-t":"tms\n"'
|
||||||
|
bind '"\C-n":"zk edit --interactive --sort modified-\n"'
|
||||||
|
|
||||||
# use lf to switch directories and bind it to ctrl-o
|
# use lf to switch directories and bind it to ctrl-o
|
||||||
function lfcd() {
|
function lfcd() {
|
||||||
tmp="$(mktemp -uq)"
|
tmp="$(mktemp -uq)"
|
||||||
|
|||||||
@ -1,111 +1,111 @@
|
|||||||
local status_ok, configs = pcall(require, "nvim-treesitter.configs")
|
local status_ok, configs = pcall(require, "nvim-treesitter.configs")
|
||||||
if not status_ok then
|
if not status_ok then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
configs.setup {
|
configs.setup({
|
||||||
ensure_installed = "all", -- one of "all" or a list of languages
|
ensure_installed = "all", -- one of "all" or a list of languages
|
||||||
sync_install = false, -- install languages synchronously (only applied to `ensure_installed`)
|
sync_install = false, -- install languages synchronously (only applied to `ensure_installed`)
|
||||||
ignore_install = { "phpdoc" }, -- List of parsers to ignore installing
|
ignore_install = { "phpdoc" }, -- List of parsers to ignore installing
|
||||||
matchup = {
|
matchup = {
|
||||||
enable = true, -- mandatory, false will disable the whole extension
|
enable = true, -- mandatory, false will disable the whole extension
|
||||||
disable_virtual_text = true,
|
disable_virtual_text = true,
|
||||||
disable = { "html" }, -- optional, list of language that will be disabled
|
disable = { "html" }, -- optional, list of language that will be disabled
|
||||||
},
|
},
|
||||||
highlight = {
|
highlight = {
|
||||||
enable = true, -- false will disable the whole extension
|
enable = true, -- false will disable the whole extension
|
||||||
disable = { "markdown" }, -- list of language that will be disabled
|
disable = { "markdown" }, -- list of language that will be disabled
|
||||||
},
|
},
|
||||||
autopairs = {
|
autopairs = {
|
||||||
enable = true,
|
enable = true,
|
||||||
},
|
},
|
||||||
indent = { enable = true, disable = { "python", "css", "rust" } },
|
indent = { enable = true, disable = { "python", "css", "rust" } },
|
||||||
context_commentstring = {
|
context_commentstring = {
|
||||||
enable = true,
|
enable = true,
|
||||||
enable_autocmd = false,
|
enable_autocmd = false,
|
||||||
},
|
},
|
||||||
autotag = {
|
autotag = {
|
||||||
enable = true,
|
enable = true,
|
||||||
disable = { "xml", "markdown" },
|
disable = { "xml", "markdown" },
|
||||||
},
|
},
|
||||||
rainbow = {
|
rainbow = {
|
||||||
enable = true,
|
enable = true,
|
||||||
extended_mode = false,
|
extended_mode = false,
|
||||||
colors = {
|
colors = {
|
||||||
-- "#68a0b0",
|
-- "#68a0b0",
|
||||||
-- "#946EaD",
|
-- "#946EaD",
|
||||||
-- "#c7aA6D",
|
-- "#c7aA6D",
|
||||||
"Gold",
|
"Gold",
|
||||||
"Orchid",
|
"Orchid",
|
||||||
"DodgerBlue",
|
"DodgerBlue",
|
||||||
-- "Cornsilk",
|
-- "Cornsilk",
|
||||||
-- "Salmon",
|
-- "Salmon",
|
||||||
-- "LawnGreen",
|
-- "LawnGreen",
|
||||||
},
|
},
|
||||||
disable = { "html" },
|
disable = { "html" },
|
||||||
},
|
},
|
||||||
playground = {
|
playground = {
|
||||||
enable = true,
|
enable = true,
|
||||||
},
|
},
|
||||||
textobjects = {
|
textobjects = {
|
||||||
select = {
|
select = {
|
||||||
enable = true,
|
enable = true,
|
||||||
-- Automatically jump forward to textobj, similar to targets.vim
|
-- Automatically jump forward to textobj, similar to targets.vim
|
||||||
lookahead = true,
|
lookahead = true,
|
||||||
keymaps = {
|
keymaps = {
|
||||||
-- You can use the capture groups defined in textobjects.scm
|
-- You can use the capture groups defined in textobjects.scm
|
||||||
["af"] = "@function.outer",
|
["af"] = "@function.outer",
|
||||||
["if"] = "@function.inner",
|
["if"] = "@function.inner",
|
||||||
["at"] = "@class.outer",
|
["at"] = "@class.outer",
|
||||||
["it"] = "@class.inner",
|
["it"] = "@class.inner",
|
||||||
["ac"] = "@call.outer",
|
["ac"] = "@call.outer",
|
||||||
["ic"] = "@call.inner",
|
["ic"] = "@call.inner",
|
||||||
["aa"] = "@parameter.outer",
|
["aa"] = "@parameter.outer",
|
||||||
["ia"] = "@parameter.inner",
|
["ia"] = "@parameter.inner",
|
||||||
["al"] = "@loop.outer",
|
["al"] = "@loop.outer",
|
||||||
["il"] = "@loop.inner",
|
["il"] = "@loop.inner",
|
||||||
["ai"] = "@conditional.outer",
|
["ai"] = "@conditional.outer",
|
||||||
["ii"] = "@conditional.inner",
|
["ii"] = "@conditional.inner",
|
||||||
["a/"] = "@comment.outer",
|
["a/"] = "@comment.outer",
|
||||||
["i/"] = "@comment.inner",
|
["i/"] = "@comment.inner",
|
||||||
["ab"] = "@block.outer",
|
["ab"] = "@block.outer",
|
||||||
["ib"] = "@block.inner",
|
["ib"] = "@block.inner",
|
||||||
["as"] = "@statement.outer",
|
["as"] = "@statement.outer",
|
||||||
["is"] = "@scopename.inner",
|
["is"] = "@scopename.inner",
|
||||||
["aA"] = "@attribute.outer",
|
["aA"] = "@attribute.outer",
|
||||||
["iA"] = "@attribute.inner",
|
["iA"] = "@attribute.inner",
|
||||||
["aF"] = "@frame.outer",
|
["aF"] = "@frame.outer",
|
||||||
["iF"] = "@frame.inner",
|
["iF"] = "@frame.inner",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
move = {
|
move = {
|
||||||
enable = true,
|
enable = true,
|
||||||
set_jumps = true, -- whether to set jumps in the jumplist
|
set_jumps = true, -- whether to set jumps in the jumplist
|
||||||
goto_next_start = {
|
goto_next_start = {
|
||||||
["]m"] = "@function.outer",
|
["]m"] = "@function.outer",
|
||||||
["]]"] = "@class.outer",
|
["]]"] = "@class.outer",
|
||||||
},
|
},
|
||||||
goto_next_end = {
|
goto_next_end = {
|
||||||
["]M"] = "@function.outer",
|
["]M"] = "@function.outer",
|
||||||
["]["] = "@class.outer",
|
["]["] = "@class.outer",
|
||||||
},
|
},
|
||||||
goto_previous_start = {
|
goto_previous_start = {
|
||||||
["[m"] = "@function.outer",
|
["[m"] = "@function.outer",
|
||||||
["[["] = "@class.outer",
|
["[["] = "@class.outer",
|
||||||
},
|
},
|
||||||
goto_previous_end = {
|
goto_previous_end = {
|
||||||
["[M"] = "@function.outer",
|
["[M"] = "@function.outer",
|
||||||
["[]"] = "@class.outer",
|
["[]"] = "@class.outer",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
swap = {
|
swap = {
|
||||||
enable = true,
|
enable = true,
|
||||||
swap_next = {
|
swap_next = {
|
||||||
["<leader>."] = "@parameter.inner",
|
["<leader>."] = "@parameter.inner",
|
||||||
},
|
},
|
||||||
swap_previous = {
|
swap_previous = {
|
||||||
["<leader>,"] = "@parameter.inner",
|
["<leader>,"] = "@parameter.inner",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
})
|
||||||
|
|||||||
@ -18,7 +18,6 @@ return {
|
|||||||
"help",
|
"help",
|
||||||
"javascript",
|
"javascript",
|
||||||
"typescript",
|
"typescript",
|
||||||
"sql",
|
|
||||||
"html",
|
"html",
|
||||||
"jsonc",
|
"jsonc",
|
||||||
},
|
},
|
||||||
|
|||||||
@ -1,9 +1,5 @@
|
|||||||
$include /etc/inputrc
|
$include /etc/inputrc
|
||||||
|
|
||||||
Control-o: lfcd
|
|
||||||
Control-t: tms
|
|
||||||
Control-n: zk edit --interactive --sort modified-
|
|
||||||
|
|
||||||
set editing-mode vi
|
set editing-mode vi
|
||||||
$if mode=vi
|
$if mode=vi
|
||||||
|
|
||||||
|
|||||||
@ -35,7 +35,8 @@ export LANG=en_US.UTF-8
|
|||||||
|
|
||||||
# Preferred editor for local and remote sessions
|
# Preferred editor for local and remote sessions
|
||||||
if [[ -n $SSH_CONNECTION ]]; then
|
if [[ -n $SSH_CONNECTION ]]; then
|
||||||
export EDITOR='nano'
|
# Probably shoud be vim or vi or even nano but it's annoying me.
|
||||||
|
export EDITOR='nvim'
|
||||||
else
|
else
|
||||||
export EDITOR='nvim'
|
export EDITOR='nvim'
|
||||||
fi
|
fi
|
||||||
@ -189,6 +190,8 @@ fi
|
|||||||
|
|
||||||
if [ "$HOST" = "holocene" ] ; then
|
if [ "$HOST" = "holocene" ] ; then
|
||||||
source /usr/share/zsh/site-functions/zsh-syntax-highlighting.zsh
|
source /usr/share/zsh/site-functions/zsh-syntax-highlighting.zsh
|
||||||
|
elif [ "$HOST" = "boost" ] ; then
|
||||||
|
source /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
|
||||||
else
|
else
|
||||||
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
|
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
|
||||||
fi
|
fi
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user