mirror of
https://github.com/ivuorinen/dotfiles.git
synced 2026-02-07 22:50:39 +00:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 410f5ac2b5 | |||
|
|
b6a18688c4 | ||
| 9f1ba5034f |
@@ -392,6 +392,9 @@ ks('n', '<leader>sw', tl.grep_string, { desc = '[S]earch current [W]ord' })
|
|||||||
ks('n', '<leader>sg', tl.live_grep, { desc = '[S]earch by [G]rep' })
|
ks('n', '<leader>sg', tl.live_grep, { desc = '[S]earch by [G]rep' })
|
||||||
ks('n', '<leader>sd', tl.diagnostics, { desc = '[S]earch [D]iagnostics' })
|
ks('n', '<leader>sd', tl.diagnostics, { desc = '[S]earch [D]iagnostics' })
|
||||||
|
|
||||||
|
-- Add harpoon to telescope
|
||||||
|
require("telescope").load_extension('harpoon')
|
||||||
|
|
||||||
-- [[ Configure Treesitter ]]
|
-- [[ Configure Treesitter ]]
|
||||||
-- See `:help nvim-treesitter`
|
-- See `:help nvim-treesitter`
|
||||||
require('nvim-treesitter.configs').setup {
|
require('nvim-treesitter.configs').setup {
|
||||||
|
|||||||
@@ -59,6 +59,13 @@ return function(use)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
-- harpoon, by ThePrimeagen
|
||||||
|
-- https://github.com/ThePrimeagen/harpoon
|
||||||
|
use {
|
||||||
|
"ThePrimeagen/harpoon",
|
||||||
|
requires = { { "nvim-lua/plenary.nvim" } }
|
||||||
|
}
|
||||||
|
|
||||||
-- An asynchronous linter plugin for Neovim complementary to
|
-- An asynchronous linter plugin for Neovim complementary to
|
||||||
-- the built-in Language Server Protocol support.
|
-- the built-in Language Server Protocol support.
|
||||||
-- https://github.com/mfussenegger/nvim-lint
|
-- https://github.com/mfussenegger/nvim-lint
|
||||||
@@ -197,4 +204,7 @@ return function(use)
|
|||||||
requires = { "jose-elias-alvarez/null-ls.nvim" }
|
requires = { "jose-elias-alvarez/null-ls.nvim" }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
-- WakaTime Support
|
||||||
|
use { "wakatime/vim-wakatime" }
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -115,18 +115,7 @@ function section_dotfiles
|
|||||||
;;
|
;;
|
||||||
shfmt)
|
shfmt)
|
||||||
# Format shell scripts according to following rules.
|
# Format shell scripts according to following rules.
|
||||||
shfmt \
|
shfmt -fn -l -w -i 2 -ci -sr -bn "$DOTFILES"
|
||||||
--find \
|
|
||||||
--list \
|
|
||||||
--write \
|
|
||||||
--diff \
|
|
||||||
--simplify \
|
|
||||||
--indent 2 \
|
|
||||||
--binary-next-line \
|
|
||||||
--case-indent \
|
|
||||||
--space-redirects \
|
|
||||||
--func-next-line \
|
|
||||||
"$DOTFILES"
|
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
menu_section "$USAGE_PREFIX" "link | update | shfmt"
|
menu_section "$USAGE_PREFIX" "link | update | shfmt"
|
||||||
|
|||||||
@@ -20,7 +20,8 @@
|
|||||||
#
|
#
|
||||||
# Simple function to show usage information, and exit.
|
# Simple function to show usage information, and exit.
|
||||||
#
|
#
|
||||||
usage() {
|
usage()
|
||||||
|
{
|
||||||
echo "Usage: $0 [-d] [-p 443] domain1.org domain2.com .. domainN"
|
echo "Usage: $0 [-d] [-p 443] domain1.org domain2.com .. domainN"
|
||||||
exit 0
|
exit 0
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -75,7 +75,6 @@ handle_file_ln "$HOME/.dotfiles/config/functions" "$HOME/.config/functions"
|
|||||||
handle_file_ln "$HOME/.dotfiles/config/gh/config.yml" "$HOME/.config/gh/config.yml"
|
handle_file_ln "$HOME/.dotfiles/config/gh/config.yml" "$HOME/.config/gh/config.yml"
|
||||||
handle_file_ln "$HOME/.dotfiles/config/git/config" "$HOME/.config/git/config"
|
handle_file_ln "$HOME/.dotfiles/config/git/config" "$HOME/.config/git/config"
|
||||||
handle_file_ln "$HOME/.dotfiles/config/git/gitignore" "$HOME/.config/git/gitignore"
|
handle_file_ln "$HOME/.dotfiles/config/git/gitignore" "$HOME/.config/git/gitignore"
|
||||||
handle_file_ln "$HOME/.dotfiles/config/nvim/after/plugin/defaults.lua" "$HOME/.config/nvim/after/plugin/defaults.lua"
|
|
||||||
handle_file_ln "$HOME/.dotfiles/config/nvim/init.lua" "$HOME/.config/nvim/init.lua"
|
handle_file_ln "$HOME/.dotfiles/config/nvim/init.lua" "$HOME/.config/nvim/init.lua"
|
||||||
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/custom/plugins.lua" "$HOME/.config/nvim/lua/custom/plugins.lua"
|
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/custom/plugins.lua" "$HOME/.config/nvim/lua/custom/plugins.lua"
|
||||||
handle_file_ln "$HOME/.dotfiles/config/nvim/plugin/packer_compiled.lua" "$HOME/.config/nvim/plugin/packer_compiled.lua"
|
handle_file_ln "$HOME/.dotfiles/config/nvim/plugin/packer_compiled.lua" "$HOME/.config/nvim/plugin/packer_compiled.lua"
|
||||||
|
|||||||
@@ -12,77 +12,95 @@ CLR_BLUE='\033[1;34m'
|
|||||||
CLR_RESET="\033[0m"
|
CLR_RESET="\033[0m"
|
||||||
|
|
||||||
# -- Helpers -- #
|
# -- Helpers -- #
|
||||||
function __log_marker() {
|
function __log_marker()
|
||||||
|
{
|
||||||
echo -e "${CLR_BLUE}➜${CLR_RESET}"
|
echo -e "${CLR_BLUE}➜${CLR_RESET}"
|
||||||
}
|
}
|
||||||
|
|
||||||
function __log_marker_ok() {
|
function __log_marker_ok()
|
||||||
|
{
|
||||||
echo -e "${CLR_GREEN}✔${CLR_RESET}"
|
echo -e "${CLR_GREEN}✔${CLR_RESET}"
|
||||||
}
|
}
|
||||||
|
|
||||||
function __log_marker_ok_blue() {
|
function __log_marker_ok_blue()
|
||||||
|
{
|
||||||
echo -e "${CLR_BLUE}✔${CLR_RESET}"
|
echo -e "${CLR_BLUE}✔${CLR_RESET}"
|
||||||
}
|
}
|
||||||
|
|
||||||
function __log_marker_warn() {
|
function __log_marker_warn()
|
||||||
|
{
|
||||||
echo -e "${CLR_YELLOW}⁕${CLR_RESET}"
|
echo -e "${CLR_YELLOW}⁕${CLR_RESET}"
|
||||||
}
|
}
|
||||||
|
|
||||||
function __log_marker_err() {
|
function __log_marker_err()
|
||||||
|
{
|
||||||
echo -e "${CLR_RED}⛌${CLR_RESET}"
|
echo -e "${CLR_RED}⛌${CLR_RESET}"
|
||||||
}
|
}
|
||||||
|
|
||||||
function __log_indent() {
|
function __log_indent()
|
||||||
|
{
|
||||||
echo " "
|
echo " "
|
||||||
}
|
}
|
||||||
|
|
||||||
# -- Log -- #
|
# -- Log -- #
|
||||||
function msg() {
|
function msg()
|
||||||
|
{
|
||||||
echo -e "$(__log_marker) $1"
|
echo -e "$(__log_marker) $1"
|
||||||
}
|
}
|
||||||
|
|
||||||
function msg_done() {
|
function msg_done()
|
||||||
|
{
|
||||||
echo -e "$(__log_marker) $1 ...$(__log_marker_ok)"
|
echo -e "$(__log_marker) $1 ...$(__log_marker_ok)"
|
||||||
}
|
}
|
||||||
|
|
||||||
function msg_prompt() {
|
function msg_prompt()
|
||||||
|
{
|
||||||
echo -e "$(__log_marker) $1"
|
echo -e "$(__log_marker) $1"
|
||||||
}
|
}
|
||||||
|
|
||||||
function msg_prompt_done() {
|
function msg_prompt_done()
|
||||||
|
{
|
||||||
echo -e "$(__log_marker) $1 ...$(__log_marker_ok)"
|
echo -e "$(__log_marker) $1 ...$(__log_marker_ok)"
|
||||||
}
|
}
|
||||||
|
|
||||||
function msg_nested() {
|
function msg_nested()
|
||||||
|
{
|
||||||
echo -e "$(__log_indent)$(__log_marker) $1"
|
echo -e "$(__log_indent)$(__log_marker) $1"
|
||||||
}
|
}
|
||||||
|
|
||||||
function msg_nested_done() {
|
function msg_nested_done()
|
||||||
|
{
|
||||||
echo -e "$(__log_indent)$(__log_marker) $1 ...$(__log_marker_ok)"
|
echo -e "$(__log_indent)$(__log_marker) $1 ...$(__log_marker_ok)"
|
||||||
}
|
}
|
||||||
|
|
||||||
function msg_run() {
|
function msg_run()
|
||||||
|
{
|
||||||
echo -e "${CLR_GREEN}➜ $1${CLR_RESET} $2"
|
echo -e "${CLR_GREEN}➜ $1${CLR_RESET} $2"
|
||||||
}
|
}
|
||||||
|
|
||||||
function msg_ok() {
|
function msg_ok()
|
||||||
|
{
|
||||||
echo -e "$(__log_marker_ok) $1"
|
echo -e "$(__log_marker_ok) $1"
|
||||||
}
|
}
|
||||||
|
|
||||||
function msg_warn() {
|
function msg_warn()
|
||||||
|
{
|
||||||
echo -e "$(__log_marker_warn) $1"
|
echo -e "$(__log_marker_warn) $1"
|
||||||
}
|
}
|
||||||
|
|
||||||
function msg_err() {
|
function msg_err()
|
||||||
|
{
|
||||||
echo -e "$(__log_marker_err) $1"
|
echo -e "$(__log_marker_err) $1"
|
||||||
}
|
}
|
||||||
|
|
||||||
# -- Menu builder -- #
|
# -- Menu builder -- #
|
||||||
function menu_section() {
|
function menu_section()
|
||||||
|
{
|
||||||
LINE=$(printf '%-18s [ %-15s ]\n' "$1" "$2")
|
LINE=$(printf '%-18s [ %-15s ]\n' "$1" "$2")
|
||||||
echo -e " $(__log_marker) $LINE"
|
echo -e " $(__log_marker) $LINE"
|
||||||
}
|
}
|
||||||
function menu_item() {
|
function menu_item()
|
||||||
|
{
|
||||||
LINE=$(printf '%-15s %-30s\n' "$1" "$2")
|
LINE=$(printf '%-15s %-30s\n' "$1" "$2")
|
||||||
echo -e "$(__log_indent)$(__log_marker) $LINE"
|
echo -e "$(__log_indent)$(__log_marker) $LINE"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user