├── .gitignore ├── config ├── tmux │ ├── .tmux.conf │ ├── tmux.conf │ └── tmux-power.tmux └── nvim │ ├── lua │ ├── plugins │ │ ├── nvim-ts-autotag.lua │ │ ├── nvim-notify.lua │ │ ├── nvim-autopairs.lua │ │ ├── which-key.lua │ │ ├── hop.lua │ │ ├── fterm.lua │ │ ├── bufferline.lua │ │ ├── catppuccin.lua │ │ ├── auto-session.lua │ │ ├── indent-blankline.lua │ │ ├── comment.lua │ │ ├── vim-sandwich.lua │ │ ├── nvim-treesitter.lua │ │ ├── onedark.lua │ │ ├── gitsigns.lua │ │ ├── nvim-cmp.lua │ │ ├── nvim-tree.lua │ │ ├── telescope.lua │ │ ├── nvim-lspconfig.lua │ │ ├── alpha-nvim.lua │ │ └── feline.lua │ ├── settings │ │ ├── command.lua │ │ ├── autocmd.lua │ │ ├── keymap.lua │ │ └── init.lua │ ├── utils │ │ └── live_grep_in_folder.lua │ └── plugins.lua │ └── init.lua ├── README.md ├── vim └── vimrc ├── zshrc └── alacritty └── .alacritty.yml /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | -------------------------------------------------------------------------------- /config/tmux/.tmux.conf: -------------------------------------------------------------------------------- 1 | 2 | source-file "${HOME}/.dotfiles/tmux/tmux.conf" 3 | source-file "${HOME}/.dotfiles/tmux/green.tmuxtheme" 4 | 5 | -------------------------------------------------------------------------------- /config/nvim/lua/plugins/nvim-ts-autotag.lua: -------------------------------------------------------------------------------- 1 | 2 | local ok, autotag = pcall(require, "nvim-ts-autotag") 3 | if not ok then 4 | return 5 | end 6 | 7 | autotag.setup() 8 | 9 | -------------------------------------------------------------------------------- /config/nvim/lua/plugins/nvim-notify.lua: -------------------------------------------------------------------------------- 1 | 2 | local ok, notify = pcall(require, "notify") 3 | if not ok then 4 | return 5 | end 6 | 7 | vim.notify = notify 8 | notify.setup() 9 | 10 | -------------------------------------------------------------------------------- /config/nvim/lua/plugins/nvim-autopairs.lua: -------------------------------------------------------------------------------- 1 | 2 | local ok, autopairs = pcall(require, "nvim-autopairs") 3 | if not ok then 4 | return 5 | end 6 | 7 | autopairs.setup({ 8 | map_cr = false, 9 | }) 10 | 11 | -------------------------------------------------------------------------------- /config/nvim/lua/plugins/which-key.lua: -------------------------------------------------------------------------------- 1 | 2 | local ok, whichkey = pcall(require, "which-key") 3 | if not ok then 4 | return 5 | end 6 | 7 | whichkey.setup({ 8 | window = { 9 | border = { "┏", "━", "┓", "┃", "┛","━", "┗", "┃" }, 10 | }, 11 | }) 12 | 13 | -------------------------------------------------------------------------------- /config/nvim/lua/plugins/hop.lua: -------------------------------------------------------------------------------- 1 | 2 | local ok, hop = pcall(require, 'hop') 3 | if not ok then 4 | return 5 | end 6 | 7 | hop.setup { 8 | keys = "etovxqpdygfblzhckisuran" 9 | } 10 | 11 | -- HopPattern 12 | vim.api.nvim_set_keymap('n', 'f', ":HopPattern", { silent = true }) 13 | -- HopWord 14 | vim.api.nvim_set_keymap('n', 'g', ":HopWord", { silent = true }) 15 | 16 | -------------------------------------------------------------------------------- /config/nvim/lua/plugins/fterm.lua: -------------------------------------------------------------------------------- 1 | 2 | local ok, fterm = pcall(require, "FTerm") 3 | if not ok then 4 | return 5 | end 6 | 7 | fterm.setup({ 8 | -- dimensions = { 9 | -- height = 0.8, 10 | -- width = 0.8, 11 | -- x = 0.5, 12 | -- y = 0.5 13 | -- }, 14 | -- border = 'single' -- or 'double' 15 | --border = { "┏", "━", "┓", "┃", "┛","━", "┗", "┃" }, 16 | }) 17 | 18 | --[[vim.cmd([[ 19 | hi FloatBorder guifg=#f2594b guibg=#282828 20 | hi NormalFloat guibg=#282828 21 | ] ]) 22 | ]] 23 | 24 | -------------------------------------------------------------------------------- /config/nvim/lua/plugins/bufferline.lua: -------------------------------------------------------------------------------- 1 | 2 | local ok, bufferline = pcall(require, 'bufferline') 3 | if not ok then 4 | return 5 | end 6 | 7 | bufferline.setup { 8 | options = { 9 | mode = "buffers", 10 | numbers = "ordinal", 11 | show_buffer_close_icons = false, 12 | show_close_icon = false, 13 | show_tab_indicators = false, 14 | always_show_bufferline = false, 15 | }, 16 | highlights = { 17 | buffer_selected = { 18 | --guifg = "#2c2d30", 19 | --guibg = "#b1b4b9" 20 | } 21 | } 22 | } 23 | 24 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # my dotfiles 2 | 3 | nvim configs are based on https://github.com/crivotz/nv-ide 4 | 5 | Commented out a lot of plugins because I don't know how to use them, I don't need them right now, and changed a lot for my own needs. 6 | 7 | ## Installation 8 | 9 | ``` 10 | git clone git@github.com:serene-dev/dotfiles.git ~/.dotfiles 11 | ln -s ~/.dotfiles/alacritty/.alacritty.yml ~/.alacritty.yml 12 | ln -s ~/.dotfiles/config/tmux ~/.config/tmux 13 | ln -s ~/.dotfiles/config/nvim ~/.config/nvim 14 | ln -s ~/.dotfiles/zshrc ~/.zshrc 15 | ``` 16 | -------------------------------------------------------------------------------- /config/nvim/lua/plugins/catppuccin.lua: -------------------------------------------------------------------------------- 1 | 2 | local ok, catppuccin = pcall(require, "catppuccin") 3 | if not ok then 4 | return 5 | end 6 | 7 | vim.g.catppuccin_flavour = "macchiato" 8 | 9 | catppuccin.setup { 10 | transparent_background = false, 11 | term_colors = true, 12 | integrations = { 13 | treesitter = true, 14 | cmp = true, 15 | telescope = true, 16 | nvimtree = { 17 | enabled = true, 18 | show_root = true, 19 | transparent_panel = false 20 | }, 21 | which_key = false, 22 | }, 23 | } 24 | catppuccin.load() 25 | 26 | -------------------------------------------------------------------------------- /config/nvim/lua/plugins/auto-session.lua: -------------------------------------------------------------------------------- 1 | 2 | local ok, auto_session = pcall(require, 'auto-session') 3 | if not ok then 4 | return 5 | end 6 | 7 | local function close_all_floating_wins() 8 | local api = vim.api 9 | for _, win in ipairs(api.nvim_list_wins()) do 10 | local config = api.nvim_win_get_config(win) 11 | if config.relative ~= '' then 12 | vim.api.nvim_win_close(win, false) 13 | end 14 | end 15 | end 16 | 17 | auto_session.setup { 18 | log_level = 'info', 19 | pre_save_cmds = { close_all_floating_wins }, 20 | auto_session_use_git_branch = true 21 | } 22 | 23 | -------------------------------------------------------------------------------- /config/nvim/lua/plugins/indent-blankline.lua: -------------------------------------------------------------------------------- 1 | 2 | local ok, indent_blankline = pcall(require, "indent_blankline") 3 | if not ok then 4 | return 5 | end 6 | 7 | vim.cmd [[highlight IndentBlanklineChar guifg=#353535 gui=nocombine]] 8 | 9 | indent_blankline.setup { 10 | char = "▏", 11 | filetype_exclude = { 12 | "help", 13 | "terminal", 14 | "packer", 15 | "lspinfo", 16 | "TelescopePrompt", 17 | "TelescopeResults", 18 | "alpha", 19 | }, 20 | buftype_exclude = { "terminal" }, 21 | show_trailing_blankline_indent = false, 22 | show_first_indent_level = false, 23 | } 24 | 25 | -------------------------------------------------------------------------------- /config/tmux/tmux.conf: -------------------------------------------------------------------------------- 1 | 2 | source-file ~/.config/tmux/tmux-power.tmux 3 | 4 | # change ctrl-B to ctrl-A 5 | unbind C-b 6 | set-option -g prefix C-a 7 | bind-key C-a send-prefix 8 | 9 | set -s escape-time 0 10 | 11 | #set-option -sa terminal-overrides ',xterm-256color:RGB' 12 | 13 | set -g default-terminal screen-256color 14 | set -g history-limit 102400 15 | set -g base-index 1 16 | setw -g pane-base-index 1 17 | set -g renumber-windows on 18 | setw -g mode-keys vi 19 | set -g mouse on 20 | set -g focus-events on 21 | 22 | # ctrl-K clear history 23 | bind -n C-k send-keys -R \; send-keys C-l \; clear-history 24 | 25 | # resize panes 26 | bind -r h resize-pane -L 5 27 | bind -r j resize-pane -D 5 28 | bind -r k resize-pane -U 5 29 | bind -r l resize-pane -R 5 30 | 31 | -------------------------------------------------------------------------------- /config/nvim/lua/plugins/comment.lua: -------------------------------------------------------------------------------- 1 | 2 | local ok, comment = pcall(require, "Comment") 3 | if not ok then 4 | return 5 | end 6 | 7 | comment.setup { 8 | --[[pre_hook = function(ctx) 9 | local U = require 'Comment.utils' 10 | 11 | local location = nil 12 | if ctx.ctype == U.ctype.block then 13 | location = require('ts_context_commentstring.utils').get_cursor_location() 14 | elseif ctx.cmotion == U.cmotion.v or ctx.cmotion == U.cmotion.V then 15 | location = require('ts_context_commentstring.utils').get_visual_start_location() 16 | end 17 | 18 | return require('ts_context_commentstring.internal').calculate_commentstring { 19 | key = ctx.ctype == U.ctype.line and '__default' or '__multiline', 20 | location = location, 21 | } 22 | end,]] 23 | 24 | mappings = { 25 | basic = true, 26 | extra = true, 27 | extended = false 28 | } 29 | } 30 | 31 | -------------------------------------------------------------------------------- /config/nvim/init.lua: -------------------------------------------------------------------------------- 1 | 2 | local present, impatient = pcall(require, "impatient") 3 | if present then 4 | impatient.enable_profile() 5 | end 6 | 7 | -- Packer 8 | require('settings') 9 | require('settings.autocmd') 10 | 11 | vim.schedule(function() 12 | require('settings.keymap') 13 | require('settings.command') 14 | end) 15 | 16 | _G.lazy = function(plugin, timer) 17 | if plugin then 18 | timer = timer or 0 19 | vim.defer_fn(function() 20 | require("packer").loader(plugin) 21 | end, timer) 22 | end 23 | end 24 | 25 | -- Packer 26 | local fn = vim.fn 27 | local install_path = fn.stdpath('data') .. '/site/pack/packer/start/packer.nvim' 28 | if fn.empty(fn.glob(install_path)) > 0 then 29 | vim.api.nvim_command('!git clone --depth 1 https://github.com/wbthomason/packer.nvim ' .. install_path) 30 | vim.cmd("packadd packer.nvim") 31 | require("plugins") 32 | require("packer").sync() 33 | end 34 | 35 | -------------------------------------------------------------------------------- /config/nvim/lua/plugins/vim-sandwich.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | vim.cmd([[ 3 | runtime macros/sandwich/keymap/surround.vim 4 | " Text objects to select 5 | " the nearest surrounded text automatically 6 | xmap iss (textobj-sandwich-auto-i) 7 | xmap ass (textobj-sandwich-auto-a) 8 | omap iss (textobj-sandwich-auto-i) 9 | omap ass (textobj-sandwich-auto-a) 10 | " remap to override again 11 | xmap S Lightspeed_S 12 | let g:sandwich#recipes += [ 13 | \ { 14 | \ 'buns': ['<%= ', ' %>'], 15 | \ 'filetype': ['eruby'], 16 | \ 'input': ['='], 17 | \ 'nesting': 1 18 | \ }, 19 | \ { 20 | \ 'buns': ['<% ', ' %>'], 21 | \ 'filetype': ['eruby'], 22 | \ 'input': ['-'], 23 | \ 'nesting': 1 24 | \ }, 25 | \ { 26 | \ 'buns': ['<%# ', ' %>'], 27 | \ 'filetype': ['eruby'], 28 | \ 'input': ['#'], 29 | \ 'nesting': 1 30 | \ } 31 | \ ] 32 | ] ]) 33 | ]] 34 | 35 | -------------------------------------------------------------------------------- /config/nvim/lua/plugins/nvim-treesitter.lua: -------------------------------------------------------------------------------- 1 | 2 | local ok, treesitter_configs = pcall(require, 'nvim-treesitter.configs') 3 | if not ok then 4 | return 5 | end 6 | 7 | treesitter_configs.setup { 8 | -- ensure_installed = "all", -- one of "all", "maintained" (parsers with maintainers), or a list of languages 9 | ignore_install = { "phpdoc", "tree-sitter-phpdoc" }, 10 | 11 | -- Install parsers synchronously (only applied to `ensure_installed`) 12 | sync_install = false, 13 | 14 | -- Automatically install missing parsers when entering buffer 15 | auto_install = true, 16 | 17 | highlight = { 18 | enable = true, -- false will disable the whole extension 19 | additional_vim_regex_highlighting = false 20 | }, 21 | context_commentstring = { 22 | enable = false, --true, 23 | enable_autocmd = false, 24 | }, 25 | incremental_selection = { 26 | enabled = true 27 | }, 28 | indent = { 29 | enabled = true, 30 | disable = {} 31 | }, 32 | matchup = { 33 | enable = true 34 | } 35 | } 36 | 37 | -------------------------------------------------------------------------------- /config/nvim/lua/settings/command.lua: -------------------------------------------------------------------------------- 1 | 2 | local function cmd(lhs, fun, opt) 3 | vim.api.nvim_create_user_command(lhs, fun, opt or {}) 4 | end 5 | 6 | -- too lazy to port to lua 7 | cmd("W", [[execute 'silent! write !sudo tee % >/dev/null' edit!]]) 8 | cmd("Messages", [[execute "tabnew pu=execute('messages') setl nomodified"]]) 9 | 10 | local packer_cmd = function(callback) 11 | return function() 12 | vim.cmd "silent! luafile %" 13 | require "plugins" 14 | require("packer")[callback]() 15 | end 16 | end 17 | 18 | cmd("PackerClean", packer_cmd "clean") 19 | cmd("PackerCompile", packer_cmd "compile") 20 | cmd("PackerInstall", packer_cmd "install") 21 | cmd("PackerStatus", packer_cmd "status") 22 | cmd("PackerSync", packer_cmd "sync") 23 | cmd("PackerUpdate", packer_cmd "update") 24 | 25 | cmd("PackerSnapshot", function(info) 26 | require("packer").snapshot(info.args) 27 | end, { nargs = "+" }) 28 | 29 | cmd("PackerSnapshotDelete", function(info) 30 | require("packer.snapshot").delete(info.args) 31 | end, { nargs = "+" }) 32 | 33 | cmd("PackerSnapshotRollback", function(info) 34 | require("packer").rollback(info.args) 35 | end, { nargs = "+" }) 36 | 37 | -------------------------------------------------------------------------------- /config/nvim/lua/plugins/onedark.lua: -------------------------------------------------------------------------------- 1 | 2 | if vim.fn.has("termguicolors") == 1 then 3 | vim.go.t_8f = "[[38;2;%lu;%lu;%lum" 4 | vim.go.t_8b = "[[48;2;%lu;%lu;%lum" 5 | vim.opt.termguicolors = true 6 | end 7 | 8 | local ok, onedark = pcall(require, 'onedark') 9 | if not ok then 10 | return 11 | end 12 | 13 | onedark.setup { 14 | -- Main options -- 15 | style = 'warm', -- Default theme style. Choose between 'dark', 'darker', 'cool', 'deep', 'warm', 'warmer' and 'light' 16 | transparent = false, -- Show/hide background 17 | term_colors = true, -- Change terminal color as per the selected theme style 18 | ending_tildes = true, -- Show the end-of-buffer tildes. By default they are hidden 19 | cmp_itemkind_reverse = false, -- reverse item kind highlights in cmp menu 20 | -- toggle theme style --- 21 | toggle_style_key = 'ts', -- Default keybinding to toggle 22 | toggle_style_list = {'dark', 'darker', 'cool', 'deep', 'warm', 'warmer', 'light'}, -- List of styles to toggle between 23 | 24 | -- Change code style --- 25 | -- Options are italic, bold, underline, none 26 | -- You can configure multiple style with comma seperated, For e.g., keywords = 'italic,bold' 27 | code_style = { 28 | comments = 'italic', 29 | keywords = 'none', 30 | functions = 'none', 31 | strings = 'none', 32 | variables = 'none' 33 | }, 34 | 35 | -- Custom Highlights -- 36 | colors = {}, -- Override default colors 37 | highlights = {}, -- Override highlight groups 38 | 39 | -- Plugins Config -- 40 | diagnostics = { 41 | darker = true, -- darker colors for diagnostic 42 | undercurl = true, -- use undercurl instead of underline for diagnostics 43 | background = true, -- use background color for virtual text 44 | }, 45 | } 46 | onedark.load() 47 | 48 | -------------------------------------------------------------------------------- /config/nvim/lua/settings/autocmd.lua: -------------------------------------------------------------------------------- 1 | 2 | local api = vim.api 3 | local fn = vim.fn 4 | 5 | api.nvim_exec([[ 6 | autocmd BufNewFile,BufRead *.slim setfiletype slim 7 | autocmd BufNewFile,BufRead /tmp/mutt-* setfiletype mail 8 | autocmd BufNewFile,BufRead /*.rasi setfiletype css 9 | augroup ruby_subtypes 10 | autocmd! 11 | autocmd BufNewFile,BufRead *.pdf.erb let b:eruby_subtype='html' 12 | autocmd BufNewFile,BufRead *.pdf.erb setfiletype eruby 13 | augroup END 14 | autocmd BufNewFile,BufRead jquery.*.js setfiletype javascript syntax=jquery 15 | autocmd BufNewFile,BufRead *.ejs setfiletype html 16 | autocmd BufNewFile,BufRead *.liquid setfiletype html 17 | autocmd BufNewFile,BufRead *.asm setlocal filetype=nasm shiftwidth=4 18 | autocmd FileType TelescopePrompt setlocal nocursorline 19 | ]], true) 20 | 21 | api.nvim_exec([[ 22 | autocmd FileType ruby,eruby let g:rubycomplete_buffer_loading = 1 23 | autocmd FileType ruby,eruby let g:rubycomplete_rails = 1 24 | " autocmd FileType ruby,eruby let g:rubycomplete_classes_in_global=1 25 | " autocmd FileType css setlocal omnifunc=csscomplete#CompleteCSS 26 | " autocmd FileType html,markdown setlocal omnifunc=htmlcomplete#CompleteTags 27 | " autocmd FileType javascript setlocal omnifunc=javascriptcomplete#CompleteJS 28 | " autocmd FileType xml setlocal omnifunc=xmlcomplete#CompleteTags 29 | " autocmd FileType php set omnifunc=phpcomplete#CompletePHP 30 | " autocmd BufRead,BufNewFile *.md setlocal spell 31 | ]], true) 32 | 33 | -- Set cursor to the last position on file open 34 | api.nvim_create_autocmd("BufReadPost", { 35 | callback = function() 36 | local last_pos = fn.line("'\"") 37 | if last_pos > 0 and last_pos <= fn.line("$") then 38 | api.nvim_win_set_cursor(0, {last_pos, 0}) 39 | end 40 | end, 41 | }) 42 | 43 | -- Highlight yanked text 44 | api.nvim_create_autocmd("TextYankPost", { 45 | callback = function() 46 | vim.highlight.on_yank() 47 | end, 48 | }) 49 | 50 | -------------------------------------------------------------------------------- /config/nvim/lua/utils/live_grep_in_folder.lua: -------------------------------------------------------------------------------- 1 | 2 | local action_set = require "telescope.actions.set" 3 | local action_state = require "telescope.actions.state" 4 | local actions = require "telescope.actions" 5 | local conf = require("telescope.config").values 6 | local finders = require "telescope.finders" 7 | local make_entry = require "telescope.make_entry" 8 | local os_sep = require("plenary.path").path.sep 9 | local pickers = require "telescope.pickers" 10 | local scan = require "plenary.scandir" 11 | 12 | local my_pickers = {} 13 | 14 | my_pickers.live_grep_in_folder = function(opts) 15 | opts = opts or {} 16 | local data = {} 17 | scan.scan_dir(vim.loop.cwd(), { 18 | hidden = opts.hidden, 19 | only_dirs = true, 20 | respect_gitignore = opts.respect_gitignore, 21 | on_insert = function(entry) 22 | table.insert(data, entry .. os_sep) 23 | end, 24 | }) 25 | table.insert(data, 1, "." .. os_sep) 26 | 27 | pickers.new(opts, { 28 | prompt_title = "Folders for Live Grep", 29 | finder = finders.new_table { results = data, entry_maker = make_entry.gen_from_file(opts) }, 30 | previewer = conf.file_previewer(opts), 31 | sorter = conf.file_sorter(opts), 32 | attach_mappings = function(prompt_bufnr) 33 | action_set.select:replace(function() 34 | local current_picker = action_state.get_current_picker(prompt_bufnr) 35 | local dirs = {} 36 | local selections = current_picker:get_multi_selection() 37 | if vim.tbl_isempty(selections) then 38 | table.insert(dirs, action_state.get_selected_entry().value) 39 | else 40 | for _, selection in ipairs(selections) do 41 | table.insert(dirs, selection.value) 42 | end 43 | end 44 | actions._close(prompt_bufnr, current_picker.initial_mode == "insert") 45 | require("telescope.builtin").live_grep { search_dirs = dirs } 46 | end) 47 | return true 48 | end, 49 | }):find() 50 | end 51 | 52 | return my_pickers 53 | 54 | -------------------------------------------------------------------------------- /config/tmux/tmux-power.tmux: -------------------------------------------------------------------------------- 1 | 2 | # Options 3 | set -gq @right_arrow_icon "" 4 | set -gq @left_arrow_icon "" 5 | 6 | # short for Theme-Colour 7 | set -gq @TC "#ffb86c" 8 | 9 | set -gq @G01 "#080808" 10 | set -gq @G02 "#121212" 11 | set -gq @G03 "#1c1c1c" 12 | set -gq @G04 "#262626" 13 | set -gq @G05 "#303030" 14 | set -gq @G06 "#3a3a3a" 15 | set -gq @G07 "#444444" 16 | set -gq @G08 "#4e4e4e" 17 | set -gq @G09 "#585858" 18 | set -gq @G10 "#626262" 19 | set -gq @G11 "#6c6c6c" 20 | set -gq @G12 "#767676" 21 | 22 | set -gqF @FG "#{@G10}" 23 | set -gqF @BG "#{@G04}" 24 | 25 | # Status options 26 | set -gq status-interval "60" 27 | set -gq status "on" 28 | 29 | # Basic status bar colors 30 | set -gqF status-fg "#{@FG}" 31 | set -gqF status-bg "#{@BG}" 32 | set -gq status-attr "none" 33 | 34 | # Left side of status bar 35 | set -gqF status-left-bg "#{@G04}" 36 | set -gqF status-left-fg "#{@G12}" 37 | set -gq status-left-length 150 38 | set -gqF status-left "#[fg=#{@TC},bg=#{@G06}]  ##S #[fg=#{@G06},bg=#{@BG}]#{@right_arrow_icon}" 39 | 40 | # Right side of status bar 41 | set -gqF status-right-bg "#{@G04}" 42 | set -gqF status-right-fg "#{@G12}" 43 | set -gq status-right-length 150 44 | set -gqF status-right "#[fg=#{@G06},bg=#{@BG}]#{@left_arrow_icon}#[fg=#{@TC},bg=#{@G06}]  %H:%M " 45 | 46 | # Window status 47 | set -gq window-status-format " #I: #W#F " 48 | set -gqF window-status-current-format "#[fg=#{@BG},bg=#{@G06}]#{@right_arrow_icon}#[fg=#{@TC},bold] ##I: ##W##F #[bg=#{@G06},fg=#{@BG},nobold]#{@left_arrow_icon}" 49 | 50 | # Window separator 51 | set -gq window-status-separator " " 52 | 53 | # Window status alignment 54 | set -gq status-justify centre 55 | 56 | # Current window status 57 | set -gqF window-status-current-statys "fg=#{@TC},bg=#{@BG}" 58 | 59 | # Pane border 60 | set -gqF pane-border-style "fg=#{@G07},bg=default" 61 | 62 | # Active pane border 63 | set -gqF pane-active-border-style "fg=#{@TC},bg=#{@BG}" 64 | 65 | # Pane number indicator 66 | set -gqF display-panes-colour "#{@G07}" 67 | set -gqF display-panes-active-colour "#{@TC}" 68 | 69 | # Clock mode 70 | set -gqF clock-mode-colour "#{@TC}" 71 | set -gq clock-mode-style 24 72 | 73 | # Message 74 | set -gqF message-style "fg=#{@TC},bg=#{@BG}" 75 | 76 | # Command message 77 | set -gqF message-command-style "fg=#{@TC},bg=#{@BG}" 78 | 79 | # Copy mode highlight 80 | set -gqF mode-style "bg=#{@TC},fg=#{@FG}" 81 | 82 | -------------------------------------------------------------------------------- /config/nvim/lua/settings/keymap.lua: -------------------------------------------------------------------------------- 1 | 2 | local map = vim.keymap.set 3 | local o = { noremap = true, silent = true } 4 | 5 | -- NvimTree 6 | map('n', ':', ':NvimTreeClose:', { noremap = true }) 7 | map('n', '-', ':NvimTreeToggle', o) 8 | map('n', 'e', ':NvimTreeToggle', o) 9 | 10 | -- Switch between buffers 11 | map('n', "''", ':b#', o) 12 | map('n', 'j', ':bp', o) 13 | map('n', 'l', ':bn', o) 14 | map('n', 'q', ':bd', o) 15 | map('n', 'Q', ':bd!', o) 16 | -- map('n', 'w', ':%bd|e#', o) 17 | map('n', '1', ':BufferLineGoToBuffer 1', o) 18 | map('n', '2', ':BufferLineGoToBuffer 2', o) 19 | map('n', '3', ':BufferLineGoToBuffer 3', o) 20 | map('n', '4', ':BufferLineGoToBuffer 4', o) 21 | map('n', '5', ':BufferLineGoToBuffer 5', o) 22 | map('n', '6', ':BufferLineGoToBuffer 6', o) 23 | map('n', '7', ':BufferLineGoToBuffer 7', o) 24 | map('n', '8', ':BufferLineGoToBuffer 8', o) 25 | map('n', '9', ':BufferLineGoToBuffer 9', o) 26 | map('n', '0', ':BufferLineGoToBuffer 10', o) 27 | 28 | -- Copy/paste from system clipboard 29 | map('', 'y', '"+y', o) 30 | map('', 'p', '"+p', o) 31 | map('', 'Y', '"+Y', o) 32 | map('', 'P', '"+P', o) 33 | 34 | -- Copy current file name to clipboard 35 | map('', 'cp', ':let @+=expand(\'%\')', o) 36 | 37 | -- Use operator pending mode to visually select the whole buffer 38 | -- e.g. dA = delete buffer ALL, yA = copy whole buffer ALL 39 | map('o', 'A', ':normal! mzggVG`z') 40 | map('x', 'A', ':normal! ggVG') 41 | 42 | -- FTerm 43 | map('', 't', ':lua require("FTerm").toggle()', o) 44 | 45 | -- Telescope 46 | map('', 'ff', ":lua require('telescope.builtin').find_files()", o) 47 | map('', 'fg', ":lua require('telescope.builtin').live_grep()", o) 48 | map('', 'fb', ":lua require('telescope.builtin').buffers()", o) 49 | map('', 'fh', ":lua require('telescope.builtin').help_tags()", o) 50 | map('', 'fr', ":lua require('telescope.builtin').resume()", o) 51 | map('', 'ft', ":lua require('utils.live_grep_in_folder').live_grep_in_folder()", o) 52 | 53 | -- Disable arrow keys 54 | map('', '', '', o) 55 | map('', '', '', o) 56 | map('', '', '', o) 57 | map('', '', '', o) 58 | 59 | -------------------------------------------------------------------------------- /config/nvim/lua/plugins/gitsigns.lua: -------------------------------------------------------------------------------- 1 | 2 | local ok, gitsigns = pcall(require, 'gitsigns') 3 | if not ok then 4 | return 5 | end 6 | 7 | gitsigns.setup { 8 | signs = { 9 | add = {hl = 'GitSignsAdd' , text = ' ', numhl='GitSignsAddNr' , linehl='GitSignsAddLn'}, 10 | change = {hl = 'GitSignsChange', text = '▎', numhl='GitSignsChangeNr', linehl='GitSignsChangeLn'}, 11 | delete = {hl = 'GitSignsDelete', text = ' ', numhl='GitSignsDeleteNr', linehl='GitSignsDeleteLn'}, 12 | topdelete = {hl = 'GitSignsDelete', text = ' ', numhl='GitSignsDeleteNr', linehl='GitSignsDeleteLn'}, 13 | changedelete = {hl = 'GitSignsChangeDelete', text = '▎', numhl='GitSignsChangeNr', linehl='GitSignsChangeLn'}, 14 | }, 15 | signcolumn = true, -- Toggle with `:Gitsigns toggle_signs` 16 | numhl = true, -- Toggle with `:Gitsigns toggle_numhl` 17 | linehl = false, -- Toggle with `:Gitsigns toggle_linehl` 18 | word_diff = false, -- Toggle with `:Gitsigns toggle_word_diff` 19 | keymaps = { 20 | -- Default keymap options 21 | noremap = true, 22 | 23 | ['n ]c'] = { expr = true, "&diff ? ']c' : 'Gitsigns next_hunk'"}, 24 | ['n [c'] = { expr = true, "&diff ? '[c' : 'Gitsigns prev_hunk'"}, 25 | 26 | ['n hs'] = 'Gitsigns stage_hunk', 27 | ['v hs'] = ':Gitsigns stage_hunk', 28 | ['n hu'] = 'Gitsigns undo_stage_hunk', 29 | ['n hr'] = 'Gitsigns reset_hunk', 30 | ['v hr'] = ':Gitsigns reset_hunk', 31 | ['n hR'] = 'Gitsigns reset_buffer', 32 | ['n hp'] = 'Gitsigns preview_hunk', 33 | ['n hb'] = 'lua require"gitsigns".blame_line{full=true}', 34 | ['n hS'] = 'Gitsigns stage_buffer', 35 | ['n hU'] = 'Gitsigns reset_buffer_index', 36 | 37 | -- Text objects 38 | ['o ih'] = ':Gitsigns select_hunk', 39 | ['x ih'] = ':Gitsigns select_hunk' 40 | }, 41 | watch_gitdir = { 42 | interval = 1000, 43 | follow_files = true 44 | }, 45 | attach_to_untracked = true, 46 | current_line_blame = false, -- Toggle with `:Gitsigns toggle_current_line_blame` 47 | current_line_blame_opts = { 48 | virt_text = true, 49 | virt_text_pos = 'eol', -- 'eol' | 'overlay' | 'right_align' 50 | delay = 1000, 51 | ignore_whitespace = false, 52 | }, 53 | current_line_blame_formatter_opts = { 54 | relative_time = false 55 | }, 56 | sign_priority = 6, 57 | update_debounce = 100, 58 | status_formatter = nil, -- Use default 59 | max_file_length = 40000, 60 | preview_config = { 61 | -- Options passed to nvim_open_win 62 | border = 'single', 63 | style = 'minimal', 64 | relative = 'cursor', 65 | row = 0, 66 | col = 1 67 | }, 68 | yadm = { 69 | enable = false 70 | }, 71 | } 72 | 73 | -------------------------------------------------------------------------------- /config/nvim/lua/settings/init.lua: -------------------------------------------------------------------------------- 1 | 2 | local g = vim.g 3 | local o = vim.opt 4 | local fn = vim.fn 5 | 6 | -- Global 7 | o.termguicolors = true 8 | o.showtabline = 2 9 | o.scrolloff = 5 10 | o.mouse = 'a' 11 | o.backupcopy = 'yes' 12 | o.undolevels = 1000 13 | o.shortmess:append { c = true, S = true, x = true } 14 | o.showmode = false 15 | o.hidden = true 16 | o.splitright = true 17 | o.splitbelow = true 18 | o.wrapscan = true 19 | o.backup = false 20 | o.writebackup = false 21 | o.showcmd = true 22 | o.showmatch = true 23 | o.incsearch = true 24 | o.ignorecase = true 25 | o.hlsearch = true 26 | o.smartcase = true 27 | o.errorbells = false 28 | o.joinspaces = false 29 | o.title = true 30 | o.lazyredraw = true 31 | o.encoding = 'UTF-8' 32 | o.completeopt = { 'menu', 'menuone', 'noselect' } 33 | -- o.clipboard = 'unnamed,unnamedplus' 34 | o.list = true 35 | o.listchars = { tab = "»·", trail = "·", precedes = "←", extends = "→", nbsp = "␣" } 36 | o.laststatus = 3 37 | o.timeoutlen = 500 38 | 39 | o.ttyfast = true 40 | o.regexpengine = 1 41 | o.synmaxcol = 200 42 | 43 | o.autoindent = true 44 | o.cindent = true 45 | o.showcmd = false 46 | o.showmode = false 47 | 48 | -- Buffer 49 | o.fileformat = 'unix' 50 | o.tabstop = 2 51 | o.spelllang = 'en' 52 | o.softtabstop = 2 53 | o.swapfile = false 54 | o.undofile = false 55 | o.expandtab = true 56 | o.shiftwidth = 2 57 | 58 | -- interval for writing swap file to disk, also used by gitsigns 59 | o.updatetime = 1000 60 | 61 | -- Disable providers 62 | g.loaded_perl_provider = 0 63 | 64 | -- Leader key to space 65 | g.mapleader = " " 66 | 67 | -- Window 68 | o.number = true 69 | o.colorcolumn = "+1" 70 | o.foldenable = false 71 | o.foldmethod = 'indent' 72 | o.foldlevel = 1 73 | o.foldnestmax = 3 74 | o.signcolumn = 'yes' 75 | o.relativenumber = true 76 | o.cursorline = true 77 | o.wrap = false 78 | o.wrapscan = false 79 | o.ruler = true 80 | 81 | -- Font 82 | if fn.has('unix') == 1 then 83 | if fn.system('uname') == "Darwin\n" then 84 | o.guifont = 'JetBrains Mono:h11' 85 | else 86 | o.guifont = 'JetBrains Mono 8' 87 | end 88 | end 89 | 90 | -- Disable builtin plugins 91 | -- g.loaded_matchparen = 1 92 | g.loaded_matchit = 1 93 | g.loaded_logiPat = 1 94 | g.loaded_logipat = 1 95 | g.loaded_rrhelper = 1 96 | g.loaded_tar = 1 97 | g.loaded_tarPlugin = 1 98 | g.loaded_man = 1 99 | g.loaded_gzip = 1 100 | g.loaded_zip = 1 101 | g.loaded_zipPlugin = 1 102 | g.loaded_2html_plugin = 1 103 | g.loaded_shada_plugin = 1 104 | g.loaded_spellfile_plugin = 1 105 | g.loaded_netrw = 1 106 | g.loaded_netrwPlugin = 1 107 | g.loaded_netrwSettings = 1 108 | g.loaded_netrwFileHandlers = 1 109 | g.loaded_tutor_mode_plugin = 1 110 | g.loaded_remote_plugins = 1 111 | g.loaded_getscript = 1 112 | g.loaded_getscriptPlugin = 1 113 | g.loaded_vimball = 1 114 | g.loaded_vimballPlugin = 1 115 | g.loaded_fzf = 1 116 | g.loaded = 1 117 | 118 | -------------------------------------------------------------------------------- /vim/vimrc: -------------------------------------------------------------------------------- 1 | set guifont=DejaVu\ Sans\ Mono\ for\ Powerline:h14 2 | 3 | call plug#begin() 4 | Plug 'tpope/vim-fugitive' 5 | Plug 'lambdalisue/fern.vim' 6 | "Plug 'scrooloose/nerdtree' 7 | Plug 'joshdick/onedark.vim' 8 | Plug 'sheerun/vim-polyglot' 9 | Plug 'vim-airline/vim-airline' 10 | Plug 'vim-airline/vim-airline-themes' 11 | Plug 'airblade/vim-gitgutter' 12 | Plug 'junegunn/fzf', { 'do': { -> fzf#install() } } 13 | Plug 'junegunn/fzf.vim' 14 | Plug 'michaeljsmith/vim-indent-object' 15 | Plug 'tpope/vim-surround' 16 | Plug 'tpope/vim-commentary' 17 | Plug 'christoomey/vim-system-copy' 18 | Plug 'jiangmiao/auto-pairs' 19 | Plug 'rust-lang/rust.vim' 20 | Plug 'ekalinin/dockerfile.vim' 21 | "Plug 'dense-analysis/ale' 22 | 23 | " if has('nvim') 24 | " Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' } 25 | " else 26 | " Plug 'Shougo/deoplete.nvim' 27 | " Plug 'roxma/nvim-yarp' 28 | " Plug 'roxma/vim-hug-neovim-rpc' 29 | " endif 30 | 31 | " Python autocompletion 32 | " Plug 'davidhalter/jedi-vim' 33 | 34 | " Plug 'neoclide/coc.nvim', {'branch': 'release'} 35 | " Plug 'pappasam/coc-jedi', { 'do': 'yarn install --frozen-lockfile && yarn build', 'branch': 'main' } 36 | 37 | " Ruby on Rails 38 | Plug 'vim-ruby/vim-ruby' 39 | Plug 'tpope/vim-rails' 40 | call plug#end() 41 | 42 | " let g:deoplete#enable_at_startup = 1 43 | " Python autocompletion support: pip3 install neovim 44 | " let g:jedi#environment_path = "/usr/bin/python3" 45 | 46 | let g:airline_powerline_fonts = 1 47 | let g:airline#extensions#tabline#enabled = 1 48 | let g:airline#extensions#branch#enabled = 1 49 | let g:airline#extensions#tabline#formatter = 'unique_tail_improved' 50 | 51 | nnoremap :FZF 52 | nnoremap :Rg 53 | 54 | filetype on 55 | filetype plugin indent on 56 | filetype indent on 57 | syntax enable 58 | colorscheme onedark 59 | 60 | set ruler 61 | set number 62 | set nowrap 63 | set number relativenumber 64 | set cursorline 65 | set mouse=a 66 | 67 | set ts=2 " Tabs are 2 spaces 68 | set bs=2 " Backspace over everything in insert mode 69 | set shiftwidth=2 " Tabs under smart indent 70 | set nocp incsearch 71 | set cinoptions=:0,p0,t0 72 | set cinwords=if,else,while,do,for,switch,case 73 | set formatoptions=tcqr 74 | set cindent autoindent smarttab expandtab 75 | set spell spelllang=en_us 76 | set ignorecase 77 | 78 | " Highlight unwanted spaces 79 | set list listchars=tab:»·,trail:· 80 | 81 | " Toggle NerdTree by pressing "-" 82 | "map - :NERDTreeToggle 83 | map - :Fern . -drawer -toggle 84 | 85 | " disable arrow keys 86 | noremap 87 | noremap 88 | noremap 89 | noremap 90 | 91 | " alt+backspace to delete words 92 | imap 93 | 94 | " : completion. 95 | inoremap pumvisible() ? "\" : "\" 96 | 97 | " Create a new tab using "tn" 98 | "nnoremap tn : tabnew 99 | " Move one tab right using "tk" 100 | "nnoremap tk : tabnext 101 | " Move one tab right using "tj" 102 | "nnoremap tj : tabprev 103 | " Only show current tab "to" 104 | "nnoremap to : tabo 105 | 106 | -------------------------------------------------------------------------------- /config/nvim/lua/plugins/nvim-cmp.lua: -------------------------------------------------------------------------------- 1 | 2 | local ok, cmp = pcall(require, 'cmp') 3 | if not ok or not cmp then 4 | return 5 | end 6 | local ok, lspkind = pcall(require, 'lspkind') 7 | if not ok then 8 | return 9 | end 10 | 11 | cmp.setup({ 12 | snippet = { 13 | -- expand = function(args) 14 | --vim.fn["vsnip#anonymous"](args.body) -- For `vsnip` user. 15 | -- end, 16 | }, 17 | mapping = { 18 | [''] = cmp.mapping(cmp.mapping.scroll_docs(-4), { 'i', 'c' }), 19 | [''] = cmp.mapping(cmp.mapping.scroll_docs(4), { 'i', 'c' }), 20 | [''] = cmp.mapping(cmp.mapping.complete(), { 'i', 'c' }), 21 | [''] = cmp.config.disable, -- Specify `cmp.config.disable` if you want to remove the default `` mapping. 22 | [''] = cmp.mapping({ 23 | i = cmp.mapping.abort(), 24 | c = cmp.mapping.close(), 25 | }), 26 | --[''] = cmp.mapping.confirm({ select = true }), 27 | [''] = cmp.mapping.select_prev_item(), 28 | [''] = cmp.mapping.select_next_item(), 29 | [''] = cmp.mapping.select_prev_item(), 30 | [''] = cmp.mapping.select_next_item(), 31 | [''] = cmp.mapping(function(fallback) 32 | if vim.bo.filetype == 'nasm' and cmp.visible() and cmp.get_active_entry() then 33 | fallback() 34 | elseif cmp.visible() then 35 | cmp.select_next_item() 36 | --elseif luasnip.expand_or_jumpable() then 37 | -- luasnip.expand_or_jump() 38 | else 39 | fallback() 40 | end 41 | end, { 'i', 's' }), 42 | [''] = cmp.mapping(function(fallback) 43 | if cmp.visible() then 44 | cmp.select_prev_item() 45 | --elseif luasnip.jumpable(-1) then 46 | -- luasnip.jump(-1) 47 | else 48 | fallback() 49 | end 50 | end, { 'i', 's' }), 51 | }, 52 | formatting = { 53 | format = lspkind.cmp_format({ 54 | mode = 'symbol_text', 55 | maxwidth = 50, 56 | menu = { 57 | buffer = "[Buffer]", 58 | nvim_lsp = "[LSP]", 59 | luasnip = "[LuaSnip]", 60 | nvim_lua = "[Lua]", 61 | latex_symbols = "[Latex]", 62 | treesitter = "[Tree]" 63 | }, 64 | before = function (entry, vim_item) 65 | return vim_item 66 | end 67 | }) 68 | }, 69 | sources = cmp.config.sources({ 70 | { name = 'nvim_lsp' }, 71 | --{ name = 'vsnip' }, 72 | { name = 'path' }, 73 | --{ name = 'calc' }, 74 | { name = 'treesitter' }, 75 | { name = 'tags' }, 76 | { name = 'rg' }, 77 | { name = 'nvim_lua' }, 78 | { name = 'nvim_lsp_signature_help' }, 79 | }, { 80 | { name = 'buffer' }, 81 | }), 82 | }) 83 | 84 | -- Use buffer source for `/` (if you enabled `native_menu`, this won't work anymore). 85 | cmp.setup.cmdline('/', { 86 | mapping = cmp.mapping.preset.cmdline(), 87 | sources = { 88 | { name = 'buffer' } 89 | } 90 | }) 91 | 92 | -- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore). 93 | cmp.setup.cmdline(':', { 94 | mapping = cmp.mapping.preset.cmdline(), 95 | sources = cmp.config.sources({ 96 | { name = 'path' } 97 | }, { 98 | { name = 'cmdline' } 99 | }) 100 | }) 101 | 102 | -------------------------------------------------------------------------------- /config/nvim/lua/plugins/nvim-tree.lua: -------------------------------------------------------------------------------- 1 | 2 | local ok, nvimtree = pcall(require, 'nvim-tree') 3 | if not ok then 4 | return 5 | end 6 | 7 | vim.g.nvim_tree_auto_ignore_ft = 'startify' 8 | 9 | -- following options are the default 10 | nvimtree.setup { 11 | -- disables netrw completely 12 | disable_netrw = true, 13 | -- hijack netrw window on startup 14 | hijack_netrw = true, 15 | -- open the tree when running this setup function 16 | open_on_setup = false, 17 | -- will not open on setup if the filetype is in this list 18 | ignore_ft_on_setup = {}, 19 | -- opens the tree when changing/opening a new tab if the tree wasn't previously opened 20 | open_on_tab = false, 21 | -- hijack the cursor in the tree to put it at the start of the filename 22 | hijack_cursor = false, 23 | -- updates the root directory of the tree on `DirChanged` (when your run `:cd` usually) 24 | update_cwd = false, 25 | -- show lsp diagnostics in the signcolumn 26 | diagnostics = { 27 | enable = true, 28 | icons = { 29 | hint = "", 30 | info = "", 31 | warning = "", 32 | error = "", 33 | } 34 | }, 35 | filters = { 36 | dotfiles = true 37 | }, 38 | -- update the focused file on `BufEnter`, un-collapses the folders recursively until it finds the file 39 | update_focused_file = { 40 | -- enables the feature 41 | enable = true, 42 | -- update the root directory of the tree to the one of the folder containing the file if the file is not under the current root directory 43 | -- only relevant when `update_focused_file.enable` is true 44 | update_cwd = true, 45 | -- list of buffer names / filetypes that will not update the cwd if the file isn't found under the current root directory 46 | -- only relevant when `update_focused_file.update_cwd` is true and `update_focused_file.enable` is true 47 | ignore_list = {} 48 | }, 49 | -- configuration options for the system open command (`s` in the tree by default) 50 | system_open = { 51 | -- the command to run this, leaving nil should work in most cases 52 | cmd = nil, 53 | -- the command arguments as a list 54 | args = {} 55 | }, 56 | view = { 57 | -- width of the window, can be either a number (columns) or a string in `%`, for left or right side placement 58 | width = 40, 59 | -- height of the window, can be either a number (columns) or a string in `%`, for top or bottom side placement 60 | -- height = 30, 61 | -- side of the tree, can be one of 'left' | 'right' | 'top' | 'bottom' 62 | side = 'left', 63 | mappings = { 64 | -- custom only false will merge the list with the default mappings 65 | -- if true, it will only use your list to set the mappings 66 | custom_only = false, 67 | -- list of mappings to set on the tree manually 68 | list = { 69 | { key = "-", action = "close" }, 70 | { key = "l", action = "edit" }, 71 | { key = "h", action = "close_node" }, 72 | } 73 | } 74 | }, 75 | renderer = { 76 | icons = { 77 | glyphs = { 78 | default = '', 79 | symlink = '', 80 | git = { unstaged = "", staged = "", unmerged = "", renamed = "", untracked = "", deleted = "✖", ignored = "" }, 81 | folder = { default = "", open = "", empty = "", empty_open = "", symlink = "" } 82 | } 83 | } 84 | }, 85 | actions = { 86 | open_file = { 87 | quit_on_open = true, 88 | resize_window = true, 89 | window_picker = { 90 | enable = true, 91 | chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890", 92 | exclude = { 93 | filetype = { "notify", "packer", "qf", "diff", "fugitive", "fugitiveblame" }, 94 | buftype = { "nofile", "terminal", "help" }, 95 | }, 96 | }, 97 | }, 98 | } 99 | } 100 | 101 | -------------------------------------------------------------------------------- /config/nvim/lua/plugins/telescope.lua: -------------------------------------------------------------------------------- 1 | 2 | local ok, telescope = pcall(require, "telescope") 3 | if not ok then 4 | return 5 | end 6 | 7 | local trouble_ok, trouble = pcall(require, "trouble.providers.telescope") 8 | 9 | local actions = require('telescope.actions') 10 | telescope.setup { 11 | defaults = { 12 | vimgrep_arguments = { 13 | "rg", 14 | "--color=never", 15 | "--no-heading", 16 | "--with-filename", 17 | "--line-number", 18 | "--column", 19 | "--smart-case", 20 | }, 21 | layout_strategy = "horizontal", 22 | layout_config = { 23 | horizontal = { 24 | prompt_position = "bottom", 25 | preview_width = 0.55, 26 | results_width = 0.8, 27 | }, 28 | vertical = { 29 | mirror = false, 30 | }, 31 | width = 0.92, 32 | height = 0.80, 33 | preview_cutoff = 120, 34 | }, 35 | -- prompt_prefix = "λ -> ", 36 | prompt_prefix = "  ", 37 | selection_caret = "|> ", 38 | winblend = 0, 39 | border = {}, 40 | borderchars = { 41 | prompt = {"━", "┃", "━", "┃", "┏", "┓", "┛", "┗"}, 42 | -- preview = {"━", "┃", "━", "┃", "┏", "┓", "┛", "┗"}, 43 | -- results = {"━", "┃", "━", "┃", "┏", "┓", "┛", "┗"}, 44 | -- prompt = {" ", " ", " ", " ", " ", " ", " ", " "}, 45 | preview = {"─", "│", "─", "│", "┌", "┐", "┘", "└"}, 46 | results = {"─", "│", "─", "│", "┌", "┐", "┘", "└"}, 47 | }, 48 | path_display = { "truncate" }, 49 | set_env = { ["COLORTERM"] = "truecolor" }, 50 | mappings = { 51 | i = { [""] = trouble.open_with_trouble }, 52 | n = { [""] = trouble.open_with_trouble }, 53 | }, 54 | file_ignore_patterns = { 55 | "^\\.", "^node_modules/", "^tmp/", "^logs/", "^storage/", "^bin/", "^public/", "%.lock", "%lock.json" 56 | } 57 | }, 58 | extensions = { 59 | fzy_native = { 60 | override_generic_sorter = false, 61 | override_file_sorter = true, 62 | } 63 | } 64 | } 65 | -- Colors 66 | -- #282828 #45403d #5a524c #3a3735 #504945 67 | -- #34381b #3b4439 #402120 #4c3432 #0e363e #374141 #4f422e #3c3836 68 | -- #e2cca9 #f2594b #f28534 #e9b143 #b0b846 #8bba7f #80aa9e #d3869b #db4740 69 | 70 | vim.cmd([[ 71 | hi TelescopePromptBorder guifg=#f2594b guibg=#282828 72 | hi TelescopePromptNormal guifg=#f2594b guibg=#282828 73 | hi TelescopePromptTitle guifg=#f2594b guibg=#282828 74 | hi TelescopePromptPrefix guifg=#f2594b guibg=#282828 75 | hi TelescopePromptCounter guifg=#f2594b guibg=#282828 76 | hi TelescopePreviewTitle guifg=#8bba7f guibg=#282828 77 | hi TelescopePreviewBorder guifg=#8bba7f guibg=#282828 78 | hi TelescopeResultsTitle guifg=#8bba7f guibg=#282828 79 | hi TelescopeResultsBorder guifg=#8bba7f guibg=#282828 80 | hi TelescopeMatching guifg=#e9b143 guibg=#282828 81 | hi TelescopeSelection guifg=#ffffff guibg=#32302f 82 | ]]) 83 | 84 | -- Extensions 85 | 86 | -- telescope.load_extension('octo') 87 | -- telescope.load_extension('fzy_native') 88 | -- telescope.load_extension('repo') 89 | -- telescope.load_extension('neoclip') 90 | -- telescope.load_extension('notify') 91 | -- telescope.load_extension('dap') 92 | 93 | -- Implement delta as previewer for diffs 94 | 95 | local previewers = require('telescope.previewers') 96 | local builtin = require('telescope.builtin') 97 | local conf = require('telescope.config') 98 | local M = {} 99 | 100 | local delta = previewers.new_termopen_previewer { 101 | get_command = function(entry) 102 | -- this is for status 103 | -- You can get the AM things in entry.status. So we are displaying file if entry.status == '??' or 'A ' 104 | -- just do an if and return a different command 105 | if entry.status == '??' or 'A ' then 106 | return { 'git', '-c', 'core.pager=delta', '-c', 'delta.side-by-side=false', 'diff', entry.value } 107 | end 108 | 109 | -- note we can't use pipes 110 | -- this command is for git_commits and git_bcommits 111 | return { 'git', '-c', 'core.pager=delta', '-c', 'delta.side-by-side=false', 'diff', entry.value .. '^!' } 112 | 113 | end 114 | } 115 | 116 | M.my_git_commits = function(opts) 117 | opts = opts or {} 118 | opts.previewer = delta 119 | 120 | builtin.git_commits(opts) 121 | end 122 | 123 | M.my_git_bcommits = function(opts) 124 | opts = opts or {} 125 | opts.previewer = delta 126 | 127 | builtin.git_bcommits(opts) 128 | end 129 | 130 | M.my_git_status = function(opts) 131 | opts = opts or {} 132 | opts.previewer = delta 133 | 134 | builtin.git_status(opts) 135 | end 136 | 137 | M.my_note = function(opts) 138 | builtin.live_grep { prompt_title = ' Note ', cwd = '~/Notes' } 139 | end 140 | 141 | M.project_files = function() 142 | local opts = {} -- define here if you want to define something 143 | local ok = pcall(require'telescope.builtin'.git_files, opts) 144 | if not ok then require'telescope.builtin'.find_files(opts) end 145 | end 146 | 147 | return M 148 | 149 | -------------------------------------------------------------------------------- /zshrc: -------------------------------------------------------------------------------- 1 | # Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc. 2 | # Initialization code that may require console input (password prompts, [y/n] 3 | # confirmations, etc.) must go above this block; everything else may go below. 4 | if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then 5 | source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" 6 | fi 7 | 8 | # If you come from bash you might have to change your $PATH. 9 | # export PATH=$HOME/bin:/usr/local/bin:$PATH 10 | 11 | # Path to your oh-my-zsh installation. 12 | export ZSH="$HOME/.oh-my-zsh" 13 | 14 | # Set name of the theme to load --- if set to "random", it will 15 | # load a random theme each time oh-my-zsh is loaded, in which case, 16 | # to know which specific one was loaded, run: echo $RANDOM_THEME 17 | # See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes 18 | #ZSH_THEME="robbyrussell" 19 | ZSH_THEME="powerlevel10k/powerlevel10k" 20 | 21 | # Set list of themes to pick from when loading at random 22 | # Setting this variable when ZSH_THEME=random will cause zsh to load 23 | # a theme from this variable instead of looking in $ZSH/themes/ 24 | # If set to an empty array, this variable will have no effect. 25 | # ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" ) 26 | 27 | # Uncomment the following line to use case-sensitive completion. 28 | # CASE_SENSITIVE="true" 29 | 30 | # Uncomment the following line to use hyphen-insensitive completion. 31 | # Case-sensitive completion must be off. _ and - will be interchangeable. 32 | # HYPHEN_INSENSITIVE="true" 33 | 34 | # Uncomment one of the following lines to change the auto-update behavior 35 | # zstyle ':omz:update' mode disabled # disable automatic updates 36 | # zstyle ':omz:update' mode auto # update automatically without asking 37 | # zstyle ':omz:update' mode reminder # just remind me to update when it's time 38 | 39 | # Uncomment the following line to change how often to auto-update (in days). 40 | # zstyle ':omz:update' frequency 13 41 | 42 | # Uncomment the following line if pasting URLs and other text is messed up. 43 | # DISABLE_MAGIC_FUNCTIONS="true" 44 | 45 | # Uncomment the following line to disable colors in ls. 46 | # DISABLE_LS_COLORS="true" 47 | 48 | # Uncomment the following line to disable auto-setting terminal title. 49 | # DISABLE_AUTO_TITLE="true" 50 | 51 | # Uncomment the following line to enable command auto-correction. 52 | # ENABLE_CORRECTION="true" 53 | 54 | # Uncomment the following line to display red dots whilst waiting for completion. 55 | # You can also set it to another string to have that shown instead of the default red dots. 56 | # e.g. COMPLETION_WAITING_DOTS="%F{yellow}waiting...%f" 57 | # Caution: this setting can cause issues with multiline prompts in zsh < 5.7.1 (see #5765) 58 | # COMPLETION_WAITING_DOTS="true" 59 | 60 | # Uncomment the following line if you want to disable marking untracked files 61 | # under VCS as dirty. This makes repository status check for large repositories 62 | # much, much faster. 63 | # DISABLE_UNTRACKED_FILES_DIRTY="true" 64 | 65 | # Uncomment the following line if you want to change the command execution time 66 | # stamp shown in the history command output. 67 | # You can set one of the optional three formats: 68 | # "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd" 69 | # or set a custom format using the strftime function format specifications, 70 | # see 'man strftime' for details. 71 | # HIST_STAMPS="mm/dd/yyyy" 72 | 73 | # Would you like to use another custom folder than $ZSH/custom? 74 | # ZSH_CUSTOM=/path/to/new-custom-folder 75 | 76 | # Which plugins would you like to load? 77 | # Standard plugins can be found in $ZSH/plugins/ 78 | # Custom plugins may be added to $ZSH_CUSTOM/plugins/ 79 | # Example format: plugins=(rails git textmate ruby lighthouse) 80 | # Add wisely, as too many plugins slow down shell startup. 81 | plugins=(zsh-autosuggestions web-search tmux) 82 | 83 | ZSH_TMUX_AUTOSTART=true 84 | ZSH_TMUX_CONFIG="$HOME/.config/tmux/tmux.conf" 85 | 86 | source $ZSH/oh-my-zsh.sh 87 | 88 | # User configuration 89 | 90 | # export MANPATH="/usr/local/man:$MANPATH" 91 | 92 | # You may need to manually set your language environment 93 | # export LANG=en_US.UTF-8 94 | 95 | # Preferred editor for local and remote sessions 96 | # if [[ -n $SSH_CONNECTION ]]; then 97 | # export EDITOR='vim' 98 | # else 99 | # export EDITOR='mvim' 100 | # fi 101 | 102 | # Compilation flags 103 | # export ARCHFLAGS="-arch x86_64" 104 | 105 | # Set personal aliases, overriding those provided by oh-my-zsh libs, 106 | # plugins, and themes. Aliases can be placed here, though oh-my-zsh 107 | # users are encouraged to define aliases within the ZSH_CUSTOM folder. 108 | # For a full list of active aliases, run `alias`. 109 | # 110 | # Example aliases 111 | # alias zshconfig="mate ~/.zshrc" 112 | # alias ohmyzsh="mate ~/.oh-my-zsh" 113 | 114 | #export FZF_DEFAULT_COMMAND='fd --type f --exclude .keep' 115 | export FZF_DEFAULT_COMMAND="rg --files -g '!app/assets/fonts/' -g '!app/assets/images/' -g '!.keep'" 116 | 117 | export GPG_TTY=$(tty) 118 | 119 | # To customize prompt, run `p10k configure` or edit ~/.p10k.zsh. 120 | [[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh 121 | 122 | bindkey '^[[Z' autosuggest-accept # shift + tab 123 | 124 | unsetopt share_history 125 | setopt no_share_history 126 | 127 | alias g='git' 128 | 129 | -------------------------------------------------------------------------------- /config/nvim/lua/plugins.lua: -------------------------------------------------------------------------------- 1 | 2 | local ok, packer = pcall(require, "packer") 3 | if not ok then 4 | return 5 | end 6 | 7 | packer.init { 8 | auto_clean = true, 9 | auto_reload_compiled = true, 10 | compile_on_sync = true, 11 | disable_commands = true, 12 | git = { clone_timeout = 6000 } 13 | } 14 | 15 | packer.startup(function(use) 16 | -- Load lua path 17 | local config = function(name) 18 | return require('plugins.' .. name) 19 | end 20 | local config_nvim = function(name) 21 | return require('plugins.' .. name:sub(0, -6):lower()) 22 | end 23 | local config_lua = function(name) 24 | return require('plugins.' .. name:sub(0, -5):lower()) 25 | end 26 | 27 | -- Packer can manage itself 28 | use 'wbthomason/packer.nvim' 29 | use 'lewis6991/impatient.nvim' 30 | 31 | -- LSP 32 | use { 'neovim/nvim-lspconfig', config = config } 33 | use { 'onsails/lspkind-nvim' } 34 | use { 'weilbith/nvim-code-action-menu', cmd = 'CodeActionMenu' } 35 | 36 | -- Autocomplete 37 | use { 'hrsh7th/nvim-cmp', config = config } 38 | use { 'hrsh7th/cmp-nvim-lsp' } 39 | use { 'hrsh7th/cmp-buffer' } 40 | --use { 'hrsh7th/cmp-vsnip' } 41 | --use { 'hrsh7th/vim-vsnip' } 42 | use { 'hrsh7th/cmp-path' } 43 | --use { 'hrsh7th/cmp-calc' } 44 | --use { 'hrsh7th/cmp-cmdline' } 45 | use { 'hrsh7th/cmp-nvim-lua' } 46 | use { 'hrsh7th/cmp-nvim-lsp-signature-help' } 47 | use { 'ray-x/cmp-treesitter' } 48 | --use { 'lukas-reineke/cmp-rg' } 49 | --use { 'quangnguyen30192/cmp-nvim-tags' } 50 | --use { 'rafamadriz/friendly-snippets' } 51 | use { 'windwp/nvim-autopairs', config = config } 52 | use { 'windwp/nvim-ts-autotag', config = config } -- tags autocompletion 53 | 54 | -- Treesitter 55 | use { 'nvim-treesitter/nvim-treesitter', run = ':TSUpdate', config = config } 56 | -- use { 'p00f/nvim-ts-rainbow', config = lua_path"nvim-ts-rainbow" } 57 | -- use { 'lukas-reineke/indent-blankline.nvim', config = config_nvim } 58 | -- use { 'JoosepAlviste/nvim-ts-context-commentstring' } 59 | -- use { 'lewis6991/nvim-treesitter-context' } 60 | -- use { 'SmiteshP/nvim-gps', config = lua_path"nvim-gps" } 61 | 62 | -- Syntax 63 | use { 'slim-template/vim-slim' } 64 | -- use { 'chrisbra/csv.vim' } 65 | -- use { 'junegunn/vim-easy-align' } 66 | -- use { 'mhartington/formatter.nvim', config = lua_path"formatter" } 67 | -- use { 'zdharma-continuum/zinit-vim-syntax' } 68 | use { 'numToStr/Comment.nvim', config = config_nvim } 69 | 70 | -- Icons 71 | use { 'kyazdani42/nvim-web-devicons' } 72 | use { 'ryanoasis/vim-devicons' } 73 | 74 | -- Status Line and Bufferline 75 | use { 'famiu/feline.nvim', config = config_nvim } 76 | --use { 'kazhala/close-buffers.nvim' } 77 | --use { 'noib3/nvim-cokeline', config = lua_path"nvim-cokeline" } 78 | use { 'akinsho/bufferline.nvim', config = config_nvim } 79 | 80 | -- Telescope 81 | use { 'nvim-lua/popup.nvim' } 82 | use { 'nvim-lua/plenary.nvim' } 83 | use { 'nvim-telescope/telescope.nvim', config = config_nvim } 84 | -- use { 'nvim-telescope/telescope-fzy-native.nvim' } 85 | -- use { 'cljoly/telescope-repo.nvim' } 86 | -- use { 'nvim-telescope/telescope-dap.nvim' } 87 | -- use { 'pwntester/octo.nvim', config = lua_path"octo" } 88 | 89 | -- Explorer 90 | use { 'kyazdani42/nvim-tree.lua', config = config_lua } 91 | 92 | -- Color 93 | use { 'navarasu/onedark.nvim', config = config_nvim } 94 | --use { 'catppuccin/nvim', config = lua_path"catppuccin" } 95 | 96 | -- View 97 | use { 'lukas-reineke/indent-blankline.nvim', config = config_nvim } 98 | -- use { 'stevearc/dressing.nvim', config = lua_path"dressing" } 99 | 100 | -- Git 101 | use { 'lewis6991/gitsigns.nvim', requires = {'nvim-lua/plenary.nvim'}, config = config_nvim } 102 | use { 'kdheepak/lazygit.nvim' } 103 | -- use { 'rhysd/committia.vim' } 104 | 105 | -- Registers & clipboard 106 | -- use { 'AckslD/nvim-neoclip.lua', config = lua_path"nvim-neoclip" } 107 | 108 | -- Move & Search & replace 109 | -- use { 'nacro90/numb.nvim', config = lua_path"numb" } 110 | -- use { 'dyng/ctrlsf.vim', config = lua_path"ctrlsf" } 111 | -- use { 'kevinhwang91/nvim-hlslens', config = lua_path"hlslens" } 112 | -- use { 'ggandor/lightspeed.nvim', config = lua_path"lightspeed" } 113 | -- use { 'karb94/neoscroll.nvim', config = lua_path"neoscroll" } 114 | -- use { 'dstein64/nvim-scrollview' } 115 | -- use { 'chaoren/vim-wordmotion' } 116 | -- use { 'fedepujol/move.nvim' } 117 | use { 'phaazon/hop.nvim', config = config_nvim } 118 | 119 | -- Tim Pope docet 120 | use { 'tpope/vim-rails' } 121 | -- use { 'tpope/vim-abolish' } 122 | -- use { 'tpope/vim-sleuth' } 123 | -- use { 'tpope/vim-bundler' } 124 | -- use { 'tpope/vim-capslock' } 125 | -- use { 'tpope/vim-repeat' } 126 | -- use { 'tpope/vim-endwise' } 127 | -- use { 'tpope/vim-dispatch' } 128 | -- use { 'tpope/vim-dadbod' } 129 | -- use { 'tpope/vim-jdaddy' } 130 | use { 'tpope/vim-fugitive' } 131 | 132 | -- Folke 133 | -- use { 'folke/trouble.nvim' } 134 | -- use { 'folke/todo-comments.nvim', config = lua_path"todo-comments" } 135 | use { 'folke/which-key.nvim', config = config_nvim } 136 | 137 | -- Tmux 138 | -- use { 'christoomey/vim-tmux-navigator' } 139 | 140 | -- Tags 141 | -- use { 'ludovicchabant/vim-gutentags', config = lua_path"vim-gutentags" } 142 | 143 | -- Debugger 144 | -- use { 'mfussenegger/nvim-dap', config = lua_path"nvim-dap" } 145 | -- use { 'rcarriga/nvim-dap-ui', config = lua_path"nvim-dap-ui" } 146 | -- use { 'theHamsta/nvim-dap-virtual-text', config = lua_path"nvim-dap-virtual-text" } 147 | 148 | -- General Plugins 149 | use { 'machakann/vim-sandwich', config = config } 150 | use { 'rcarriga/nvim-notify', config = config } 151 | -- use { 'airblade/vim-rooter', config = lua_path"vim-rooter" } 152 | -- use { 'goolord/alpha-nvim', config = config } 153 | -- use { 'jeffkreeftmeijer/vim-numbertoggle' } 154 | -- use { 'lambdalisue/suda.vim' } 155 | use { 'numtostr/FTerm.nvim', config = config_nvim } 156 | -- use { 'wfxr/minimap.vim', config = lua_path"minimap" } 157 | -- use { 'luukvbaal/stabilize.nvim', config = lua_path"stabilize" } 158 | -- use { 'beauwilliams/focus.nvim', config = lua_path"focus" } 159 | -- use { 'kevinhwang91/nvim-bqf' } 160 | use { 'rmagatti/auto-session', config = config } 161 | 162 | -- Vimwiki 163 | use { 'vimwiki/vimwiki' } 164 | use { 'jamessan/vim-gnupg' } 165 | end) 166 | 167 | -------------------------------------------------------------------------------- /config/nvim/lua/plugins/nvim-lspconfig.lua: -------------------------------------------------------------------------------- 1 | 2 | local ok, nvim_lsp = pcall(require, 'lspconfig') 3 | if not ok then 4 | return 5 | end 6 | 7 | local lsp_capabilities = vim.lsp.protocol.make_client_capabilities() 8 | lsp_capabilities.textDocument.completion.completionItem.snippetSupport = true 9 | 10 | local capabilities = require('cmp_nvim_lsp').default_capabilities(lsp_capabilities) 11 | 12 | -- Diagnostics symbols for display in the sign column. 13 | local signs = { Error = "", Warn = "", Hint = "", Info = "" } 14 | for type, icon in pairs(signs) do 15 | local hl = "DiagnosticSign" .. type 16 | vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = hl }) 17 | end 18 | vim.cmd('setlocal omnifunc=v:lua.vim.lsp.omnifunc') 19 | 20 | local opts = { noremap=true, silent=true } 21 | vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, opts) 22 | vim.keymap.set('n', ']d', vim.diagnostic.goto_next, opts) 23 | vim.keymap.set('n', 'e', vim.diagnostic.open_float, opts) 24 | -- vim.keymap.set('n', 'q', vim.lsp.diagnostic.set_loclist, opts) 25 | 26 | -- Use an on_attach function to only map the following keys 27 | -- after the language server attaches to the current buffer 28 | local on_attach = function(client, bufnr) 29 | -- local function buf_set_keymap(...) vim.api.nvim_buf_set_keymap(bufnr, ...) end 30 | 31 | -- Enable completion triggered by 32 | vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc') 33 | 34 | -- Mappings. 35 | local bufopts = { noremap=true, silent=true, buffer=bufnr } 36 | 37 | -- See `:help vim.lsp.*` for documentation on any of the below functions 38 | vim.keymap.set('n', 'gD', 'lua vim.lsp.buf.declaration()', bufopts) 39 | vim.keymap.set('n', 'gd', 'lua vim.lsp.buf.definition()', bufopts) 40 | vim.keymap.set('n', 'K', 'lua vim.lsp.buf.hover()', bufopts) 41 | vim.keymap.set('n', 'gi', 'lua vim.lsp.buf.implementation()', bufopts) 42 | vim.keymap.set('n', '', 'lua vim.lsp.buf.signature_help()', bufopts) 43 | vim.keymap.set('n', 'wa', 'lua vim.lsp.buf.add_workspace_folder()', bufopts) 44 | vim.keymap.set('n', 'wr', 'lua vim.lsp.buf.remove_workspace_folder()', bufopts) 45 | vim.keymap.set('n', 'wl', 'lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))', bufopts) 46 | vim.keymap.set('n', 'D', 'lua vim.lsp.buf.type_definition()', bufopts) 47 | vim.keymap.set('n', 'rn', 'lua vim.lsp.buf.rename()', bufopts) 48 | vim.keymap.set('n', 'ca', 'lua vim.lsp.buf.code_action()', bufopts) 49 | vim.keymap.set('n', 'gr', 'lua vim.lsp.buf.references()', bufopts) 50 | vim.keymap.set("n", "F", "lua vim.lsp.buf.formatting()", bufopts) 51 | end 52 | 53 | -- Python 54 | -- pip install pyright 55 | nvim_lsp.pyright.setup{ 56 | capabilities = capabilities 57 | } 58 | 59 | local flags = { 60 | --debounce_text_changes = 150, 61 | } 62 | 63 | -- Ruby 64 | -- gem install solargraph 65 | nvim_lsp.solargraph.setup { 66 | --cmd = { "bundle", "exec", "solargraph", "stdio" }, 67 | cmd = { "solargraph", "stdio" }, 68 | on_attach = on_attach, 69 | capabilities = capabilities, 70 | flags = flags, 71 | settings = { 72 | solargraph = { 73 | diagnostics = true 74 | } 75 | } 76 | } 77 | 78 | -- steep 79 | -- gem install steep 80 | -- nvim_lsp.steep.setup { 81 | -- on_attach = on_attach, 82 | -- capabilities = capabilities, 83 | -- flags = flags, 84 | -- } 85 | 86 | -- CSS 87 | -- npm i -g vscode-langservers-extracted 88 | nvim_lsp.cssls.setup { 89 | filetypes = { "css", "scss", "less" }, 90 | on_attach = on_attach, 91 | capabilities = capabilities, 92 | flags = flags, 93 | } 94 | 95 | -- stylelint 96 | -- npm install -g stylelint-lsp 97 | nvim_lsp.stylelint_lsp.setup { 98 | on_attach = on_attach, 99 | capabilities = capabilities, 100 | flags = flags, 101 | } 102 | 103 | 104 | -- HTML 105 | -- npm i -g vscode-langservers-extracted 106 | nvim_lsp.html.setup { 107 | configurationSection = { "html", "css", "javascript" }, 108 | embeddedLanguages = { 109 | css = true, 110 | javascript = true 111 | }, 112 | provideFormatter = true, 113 | on_attach = on_attach, 114 | capabilities = capabilities, 115 | flags = flags, 116 | } 117 | 118 | -- eslint 119 | -- npm i -g vscode-langservers-extracted 120 | nvim_lsp.eslint.setup { 121 | on_attach = on_attach, 122 | capabilities = capabilities, 123 | flags = flags, 124 | } 125 | 126 | -- tsserver 127 | -- npm install -g typescript typescript-language-server 128 | --[[ 129 | To configure type language server, add a tsconfig.json or jsconfig.json to the root of your project. 130 | Here's an example that disables type checking in JavaScript files. 131 | { 132 | "compilerOptions": { 133 | "module": "commonjs", 134 | "target": "es6", 135 | "checkJs": false 136 | }, 137 | "exclude": [ 138 | "node_modules" 139 | ] 140 | } 141 | ]] 142 | nvim_lsp.tsserver.setup { 143 | on_attach = on_attach, 144 | capabilities = capabilities, 145 | flags = flags, 146 | } 147 | 148 | -- CLangd 149 | nvim_lsp.clangd.setup { 150 | on_attach = on_attach, 151 | capabilities = capabilities, 152 | flags = flags, 153 | } 154 | 155 | -- YAML 156 | -- npm install -g yaml-language-server 157 | nvim_lsp.yamlls.setup { 158 | on_attach = on_attach, 159 | capabilities = capabilities, 160 | flags = flags, 161 | filetypes = { 'yaml', 'yaml.docker-compose', 'yml' } 162 | } 163 | 164 | -- Vue 165 | -- npm install -g vls 166 | nvim_lsp.vuels.setup { 167 | on_attach = on_attach, 168 | capabilities = capabilities, 169 | flags = flags, 170 | } 171 | 172 | -- Vim 173 | -- npm install -g vim-language-server 174 | nvim_lsp.vimls.setup { 175 | on_attach = on_attach, 176 | capabilities = capabilities, 177 | flags = flags, 178 | } 179 | 180 | -- Asm 181 | -- cargo install asm-lsp 182 | nvim_lsp.asm_lsp.setup { 183 | on_attach = on_attach, 184 | capabilities = capabilities, 185 | flags = flags, 186 | } 187 | 188 | -- Lua 189 | nvim_lsp.sumneko_lua.setup { 190 | --cmd = {"lua-language-server"}, 191 | on_attach = on_attach, 192 | capabilities = capabilities, 193 | flags = flags, 194 | settings = { 195 | Lua = { 196 | runtime = { 197 | -- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim) 198 | version = 'LuaJIT', 199 | }, 200 | diagnostics = { 201 | -- Get the language server to recognize the `vim` global 202 | globals = {'vim'}, 203 | }, 204 | workspace = { 205 | -- Make the server aware of Neovim runtime files 206 | library = vim.api.nvim_get_runtime_file("", true), 207 | }, 208 | -- Do not send telemetry data containing a randomized but unique identifier 209 | telemetry = { 210 | enable = false, 211 | }, 212 | }, 213 | }, 214 | } 215 | 216 | -------------------------------------------------------------------------------- /config/nvim/lua/plugins/alpha-nvim.lua: -------------------------------------------------------------------------------- 1 | 2 | local status_ok, alpha = pcall(require, "alpha") 3 | if not status_ok then 4 | return 5 | end 6 | 7 | local path_ok, path = pcall(require, "plenary.path") 8 | if not path_ok then 9 | return 10 | end 11 | 12 | local dashboard = require("alpha.themes.dashboard") 13 | local nvim_web_devicons = require "nvim-web-devicons" 14 | local cdir = vim.fn.getcwd() 15 | 16 | local function get_extension(fn) 17 | local match = fn:match("^.+(%..+)$") 18 | local ext = "" 19 | if match ~= nil then 20 | ext = match:sub(2) 21 | end 22 | return ext 23 | end 24 | 25 | local function footer() 26 | local total_plugins = #vim.tbl_keys(packer_plugins) 27 | local date = os.date("%d-%m-%Y") 28 | local time = os.date("%H:%M:%S") 29 | return "[ " .. total_plugins .. " plugins] [ " .. date .. "] [ " .. time .. "]" 30 | end 31 | 32 | local function icon(fn) 33 | local nwd = require("nvim-web-devicons") 34 | local ext = get_extension(fn) 35 | return nwd.get_icon(fn, ext, { default = true }) 36 | end 37 | 38 | local function file_button(fn, sc, short_fn) 39 | short_fn = short_fn or fn 40 | local ico_txt 41 | local fb_hl = {} 42 | 43 | local ico, hl = icon(fn) 44 | local hl_option_type = type(nvim_web_devicons.highlight) 45 | if hl_option_type == "boolean" then 46 | if hl and nvim_web_devicons.highlight then 47 | table.insert(fb_hl, { hl, 0, 1 }) 48 | end 49 | end 50 | if hl_option_type == "string" then 51 | table.insert(fb_hl, { nvim_web_devicons.highlight, 0, 1 }) 52 | end 53 | ico_txt = ico .. " " 54 | 55 | local file_button_el = dashboard.button(sc, ico_txt .. short_fn, "e " .. fn .. " ") 56 | local fn_start = short_fn:match(".*/") 57 | if fn_start ~= nil then 58 | table.insert(fb_hl, { "Type", #ico_txt - 2, #fn_start + #ico_txt - 2 }) 59 | end 60 | file_button_el.opts.hl = fb_hl 61 | return file_button_el 62 | end 63 | 64 | local default_mru_ignore = { "gitcommit" } 65 | 66 | local mru_opts = { 67 | ignore = function(path, ext) 68 | return (string.find(path, "COMMIT_EDITMSG")) or (vim.tbl_contains(default_mru_ignore, ext)) 69 | end, 70 | } 71 | 72 | --- @param start number 73 | --- @param cwd string optional 74 | --- @param items_number number optional number of items to generate, default = 10 75 | local function mru(start, cwd, items_number, opts) 76 | opts = opts or mru_opts 77 | items_number = items_number or 9 78 | 79 | local oldfiles = {} 80 | for _, v in pairs(vim.v.oldfiles) do 81 | if #oldfiles == items_number then 82 | break 83 | end 84 | local cwd_cond 85 | if not cwd then 86 | cwd_cond = true 87 | else 88 | cwd_cond = vim.startswith(v, cwd) 89 | end 90 | local ignore = (opts.ignore and opts.ignore(v, get_extension(v))) or false 91 | if (vim.fn.filereadable(v) == 1) and cwd_cond and not ignore then 92 | oldfiles[#oldfiles + 1] = v 93 | end 94 | end 95 | 96 | local special_shortcuts = {} 97 | local target_width = 35 98 | 99 | local tbl = {} 100 | for i, fn in ipairs(oldfiles) do 101 | local short_fn 102 | if cwd then 103 | short_fn = vim.fn.fnamemodify(fn, ":.") 104 | else 105 | short_fn = vim.fn.fnamemodify(fn, ":~") 106 | end 107 | 108 | if(#short_fn > target_width) then 109 | short_fn = path.new(short_fn):shorten(1, {-2, -1}) 110 | if(#short_fn > target_width) then 111 | short_fn = path.new(short_fn):shorten(1, {-1}) 112 | end 113 | end 114 | 115 | local shortcut = "" 116 | if i <= #special_shortcuts then 117 | shortcut = special_shortcuts[i] 118 | else 119 | shortcut = tostring(i + start - 1 - #special_shortcuts) 120 | end 121 | 122 | local file_button_el = file_button(fn, " " .. shortcut, short_fn) 123 | tbl[i] = file_button_el 124 | end 125 | return { 126 | type = "group", 127 | val = tbl, 128 | opts = {}, 129 | } 130 | end 131 | 132 | local logo = { 133 | [[╭╮╭┬─╮╭─╮┬ ┬┬╭┬╮]], 134 | [[│││├┤ │ │╰┐┌╯││││]], 135 | [[╯╰╯╰─╯╰─╯ ╰╯ ┴┴ ┴]] 136 | } 137 | local logo2 = { 138 | [[ ____ ___ ___ __ __ ____ ___ ___ ]], 139 | [[ | \ / _] / \ | T |l j| T T ]], 140 | [[ | _ Y / [_ Y Y| | | | T | _ _ | ]], 141 | [[ | | |Y _]| O || | | | | | \_/ | ]], 142 | [[ | | || [_ | |l : ! | | | | | ]], 143 | [[ | | || Tl ! \ / j l | | | ]], 144 | [[ l__j__jl_____j \___/ \_/ |____jl___j___j ]], 145 | } 146 | local logo3 = { 147 | [[ __ _ _______ _______ __ __ ___ __ __ ]], 148 | [[ | | | || || || | | || | | |_| | ]], 149 | [[ | |_| || ___|| _ || |_| || | | | ]], 150 | [[ | || |___ | | | || || | | | ]], 151 | [[ | _ || ___|| |_| || || | | | ]], 152 | [[ | | | || |___ | | | | | | | ||_|| | ]], 153 | [[ |_| |__||_______||_______| |___| |___| |_| |_| ]], 154 | } 155 | local logo4 = { 156 | [[ ███╗ ██╗███████╗ ██████╗ ██╗ ██╗██╗███╗ ███╗ ]], 157 | [[ ████╗ ██║██╔════╝██╔═══██╗██║ ██║██║████╗ ████║ ]], 158 | [[ ██╔██╗ ██║█████╗ ██║ ██║██║ ██║██║██╔████╔██║ ]], 159 | [[ ██║╚██╗██║██╔══╝ ██║ ██║╚██╗ ██╔╝██║██║╚██╔╝██║ ]], 160 | [[ ██║ ╚████║███████╗╚██████╔╝ ╚████╔╝ ██║██║ ╚═╝ ██║ ]], 161 | [[ ╚═╝ ╚═══╝╚══════╝ ╚═════╝ ╚═══╝ ╚═╝╚═╝ ╚═╝ ]], 162 | } 163 | 164 | local section_header = { 165 | type = "text", 166 | val = logo4, 167 | opts = { 168 | hl = "Type", 169 | position = "center", 170 | } 171 | } 172 | 173 | local section_mru = { 174 | type = "group", 175 | val = { 176 | { 177 | type = "text", 178 | val = "Recent files", 179 | opts = { 180 | hl = "Constant", 181 | shrink_margin = false, 182 | position = "center", 183 | }, 184 | }, 185 | { type = "padding", val = 1 }, 186 | { 187 | type = "group", 188 | val = function() 189 | return { mru(1, cdir, 9) } 190 | end, 191 | opts = { shrink_margin = false }, 192 | }, 193 | } 194 | } 195 | 196 | local buttons = { 197 | type = "group", 198 | val = { 199 | { type = "text", val = "Quick links", opts = { hl = "Constant", position = "center" } }, 200 | { type = "padding", val = 1 }, 201 | dashboard.button("e", " New file", ":ene startinsert "), 202 | dashboard.button("o", "ﭯ Recently opened files", ":Telescope oldfiles"), 203 | dashboard.button("f", " Find file", ":lua require('plugins.telescope').project_files()"), 204 | dashboard.button("p", " Find project", ":Telescope repo list"), 205 | dashboard.button("r", " Find word", ":lua require('telescope.builtin').live_grep()"), 206 | dashboard.button("g", " Find modified file", ":lua require('plugins.telescope').my_git_status()"), 207 | dashboard.button("m", " Show mark", ":Telescope marks"), 208 | dashboard.button("t", " Show todo", ":TodoTelescope"), 209 | dashboard.button("u", " Sync plugins", ":PackerSync"), 210 | dashboard.button("h", " Neovim Check health", ":checkhealth"), 211 | dashboard.button("q", " Quit", "qa") 212 | }, 213 | position = "center", 214 | } 215 | 216 | local section_footer = { 217 | type = "group", 218 | val = { 219 | { type = "text", val = footer(), opts = { hl = "Constant", position = "center" } }, 220 | } 221 | } 222 | 223 | local opts = { 224 | layout = { 225 | { type = "padding", val = 10 }, 226 | section_header, 227 | { type = "padding", val = 2 }, 228 | section_mru, 229 | { type = "padding", val = 2 }, 230 | buttons, 231 | { type = "padding", val = 2 }, 232 | section_footer, 233 | }, 234 | opts = { 235 | margin = 5, 236 | }, 237 | } 238 | 239 | alpha.setup(opts) 240 | 241 | -------------------------------------------------------------------------------- /config/nvim/lua/plugins/feline.lua: -------------------------------------------------------------------------------- 1 | 2 | if not pcall(require, "feline") then 3 | return 4 | end 5 | 6 | local has_autosesson, autosesson = pcall(require, "auto-session-library") 7 | 8 | local colors = { 9 | bg = '#282c34', 10 | fg = '#abb2bf', 11 | yellow = '#e0af68', 12 | cyan = '#56b6c2', 13 | darkblue = '#081633', 14 | green = '#98c379', 15 | orange = '#d19a66', 16 | violet = '#a9a1e1', 17 | magenta = '#c678dd', 18 | blue = '#61afef', 19 | red = '#e86671' 20 | } 21 | 22 | local vi_mode_colors = { 23 | NORMAL = colors.green, 24 | INSERT = colors.red, 25 | VISUAL = colors.magenta, 26 | OP = colors.green, 27 | BLOCK = colors.blue, 28 | REPLACE = colors.violet, 29 | ['V-REPLACE'] = colors.violet, 30 | ENTER = colors.cyan, 31 | MORE = colors.cyan, 32 | SELECT = colors.orange, 33 | COMMAND = colors.green, 34 | SHELL = colors.green, 35 | TERM = colors.green, 36 | NONE = colors.yellow 37 | } 38 | 39 | local function file_osinfo() 40 | local os = vim.bo.fileformat:upper() 41 | local icon 42 | if os == 'UNIX' then 43 | icon = ' ' 44 | elseif os == 'MAC' then 45 | icon = ' ' 46 | else 47 | icon = ' ' 48 | end 49 | return icon .. os 50 | end 51 | 52 | local lsp = require 'feline.providers.lsp' 53 | local vi_mode_utils = require 'feline.providers.vi_mode' 54 | 55 | local lsp_get_diag = function(str) 56 | local count = lsp.get_diagnostics_count(str) 57 | return (count > 0) and ' '..count..' ' or '' 58 | 59 | --local count = vim.diagnostic.get(0, { severity = vim.diagnostic.severity[str] }) 60 | --return (count > 0) and ' '..count..' ' or '' 61 | end 62 | 63 | -- LuaFormatter off 64 | 65 | local comps = { 66 | vi_mode = { 67 | left = { 68 | provider = function() 69 | return '▊ ' .. vi_mode_utils.get_vim_mode() 70 | -- return '  ' .. vi_mode_utils.get_vim_mode() 71 | end, 72 | hl = function() 73 | local val = { 74 | name = vi_mode_utils.get_mode_highlight_name(), 75 | fg = vi_mode_utils.get_mode_color(), 76 | -- fg = colors.bg 77 | } 78 | return val 79 | end, 80 | right_sep = ' ' 81 | }, 82 | right = { 83 | provider = '▊', 84 | -- provider = '' , 85 | hl = function() 86 | local val = { 87 | name = vi_mode_utils.get_mode_highlight_name(), 88 | fg = vi_mode_utils.get_mode_color() 89 | } 90 | return val 91 | end, 92 | left_sep = ' ', 93 | right_sep = '' 94 | } 95 | }, 96 | file = { 97 | info = { 98 | provider = { 99 | name = 'file_info', 100 | opts = { 101 | type = 'relative', 102 | file_readonly_icon = '  ', 103 | file_modified_icon = '', 104 | } 105 | }, 106 | short_provider = { 107 | name = 'file_info', 108 | opts = { 109 | type = 'relative-short', 110 | file_readonly_icon = '  ', 111 | file_modified_icon = '', 112 | } 113 | }, 114 | hl = { 115 | fg = colors.blue, 116 | style = 'bold' 117 | }, 118 | left_sep = ' ', 119 | right_sep = ' ' 120 | }, 121 | encoding = { 122 | provider = 'file_encoding', 123 | left_sep = ' ', 124 | hl = { 125 | fg = colors.violet, 126 | style = 'bold' 127 | } 128 | }, 129 | type = { 130 | provider = 'file_type' 131 | }, 132 | os = { 133 | provider = file_osinfo, 134 | enabled = function() 135 | return vim.api.nvim_win_get_width(0) > 120 136 | end, 137 | left_sep = ' ', 138 | hl = { 139 | fg = colors.violet, 140 | style = 'bold' 141 | } 142 | }, 143 | position = { 144 | provider = 'position', 145 | left_sep = ' ', 146 | hl = { 147 | fg = colors.cyan, 148 | -- style = 'bold' 149 | } 150 | }, 151 | }, 152 | line_percentage = { 153 | provider = 'line_percentage', 154 | left_sep = ' ', 155 | hl = { 156 | style = 'bold' 157 | } 158 | }, 159 | scroll_bar = { 160 | provider = 'scroll_bar', 161 | left_sep = ' ', 162 | hl = { 163 | fg = colors.blue, 164 | style = 'bold' 165 | } 166 | }, 167 | diagnos = { 168 | err = { 169 | provider = 'diagnostic_errors', 170 | icon = ' ', 171 | right_sep = ' ', 172 | -- left_sep = ' ', 173 | enabled = function() return lsp.diagnostics_exist(vim.diagnostic.severity.ERROR) end, 174 | hl = { 175 | fg = colors.red 176 | } 177 | }, 178 | warn = { 179 | provider = 'diagnostic_warnings', 180 | icon = ' ', 181 | right_sep = ' ', 182 | -- left_sep = ' ', 183 | enabled = function() return lsp.diagnostics_exist(vim.diagnostic.severity.WARN) end, 184 | hl = { 185 | fg = colors.yellow 186 | } 187 | }, 188 | info = { 189 | provider = 'diagnostic_info', 190 | icon = ' ', 191 | right_sep = ' ', 192 | -- left_sep = ' ', 193 | enabled = function() return lsp.diagnostics_exist(vim.diagnostic.severity.INFO) end, 194 | hl = { 195 | fg = colors.blue 196 | } 197 | }, 198 | hint = { 199 | provider = 'diagnostic_hints', 200 | --icon = ' ', 201 | right_sep = ' ', 202 | -- left_sep = ' ', 203 | enabled = function() return lsp.diagnostics_exist(vim.diagnostic.severity.HINT) end, 204 | hl = { 205 | fg = colors.cyan 206 | } 207 | }, 208 | }, 209 | lsp = { 210 | name = { 211 | provider = 'lsp_client_names', 212 | left_sep = ' ', 213 | right_sep = ' ', 214 | -- icon = ' ', 215 | icon = '慎', 216 | hl = { 217 | fg = colors.yellow 218 | } 219 | } 220 | }, 221 | git = { 222 | branch = { 223 | provider = 'git_branch', 224 | icon = ' ', 225 | left_sep = '', 226 | right_sep = ' ', 227 | hl = { 228 | fg = colors.violet, 229 | style = 'bold' 230 | }, 231 | }, 232 | add = { 233 | provider = 'git_diff_added', 234 | hl = { 235 | fg = colors.green 236 | } 237 | }, 238 | change = { 239 | provider = 'git_diff_changed', 240 | hl = { 241 | fg = colors.orange 242 | } 243 | }, 244 | remove = { 245 | provider = 'git_diff_removed', 246 | hl = { 247 | fg = colors.red 248 | } 249 | } 250 | } 251 | } 252 | 253 | local components = { 254 | active = {}, 255 | inactive = {}, 256 | } 257 | 258 | table.insert(components.active, {}) 259 | table.insert(components.active, {}) 260 | table.insert(components.active, {}) 261 | table.insert(components.inactive, {}) 262 | table.insert(components.inactive, {}) 263 | table.insert(components.inactive, {}) 264 | 265 | table.insert(components.active[1], comps.vi_mode.left) 266 | table.insert(components.active[1], comps.git.branch) 267 | table.insert(components.active[1], comps.git.add) 268 | table.insert(components.active[1], comps.git.change) 269 | table.insert(components.active[1], comps.git.remove) 270 | table.insert(components.active[1], comps.file.info) 271 | table.insert(components.inactive[1], comps.vi_mode.left) 272 | table.insert(components.inactive[1], comps.file.info) 273 | table.insert(components.active[3], comps.diagnos.err) 274 | table.insert(components.active[3], comps.diagnos.warn) 275 | table.insert(components.active[3], comps.diagnos.hint) 276 | table.insert(components.active[3], comps.diagnos.info) 277 | table.insert(components.active[3], comps.lsp.name) 278 | table.insert(components.active[3], comps.file.os) 279 | table.insert(components.active[3], comps.file.position) 280 | table.insert(components.active[3], comps.line_percentage) 281 | --table.insert(components.active[3], comps.scroll_bar) 282 | table.insert(components.active[3], comps.vi_mode.right) 283 | 284 | 285 | -- TreeSitter 286 | -- local ts_utils = require("nvim-treesitter.ts_utils") 287 | -- local ts_parsers = require("nvim-treesitter.parsers") 288 | -- local ts_queries = require("nvim-treesitter.query") 289 | --[[ table.insert(components.active[2], { 290 | provider = function() 291 | local node = require("nvim-treesitter.ts_utils").get_node_at_cursor() 292 | return ("%d:%s [%d, %d] - [%d, %d]") 293 | :format(node:symbol(), node:type(), node:range()) 294 | end, 295 | enabled = function() 296 | local ok, ts_parsers = pcall(require, "nvim-treesitter.parsers") 297 | return ok and ts_parsers.has_parser() 298 | end 299 | }) ]] 300 | 301 | -- require'feline'.setup {} 302 | require'feline'.setup { 303 | colors = { bg = colors.bg, fg = colors.fg }, 304 | components = components, 305 | vi_mode_colors = vi_mode_colors, 306 | force_inactive = { 307 | filetypes = { 308 | 'packer', 309 | 'NvimTree', 310 | 'fugitive', 311 | 'fugitiveblame' 312 | }, 313 | buftypes = {'terminal'}, 314 | bufnames = {} 315 | } 316 | } 317 | 318 | -------------------------------------------------------------------------------- /alacritty/.alacritty.yml: -------------------------------------------------------------------------------- 1 | # Configuration for Alacritty, the GPU enhanced terminal emulator. 2 | 3 | # Import additional configuration files 4 | # 5 | # Imports are loaded in order, skipping all missing files, with the importing 6 | # file being loaded last. If a field is already present in a previous import, it 7 | # will be replaced. 8 | # 9 | # All imports must either be absolute paths starting with `/`, or paths relative 10 | # to the user's home directory starting with `~/`. 11 | #import: 12 | # - /path/to/alacritty.yml 13 | 14 | # Any items in the `env` entry below will be added as 15 | # environment variables. Some entries may override variables 16 | # set by alacritty itself. 17 | #env: 18 | # TERM variable 19 | # 20 | # This value is used to set the `$TERM` environment variable for 21 | # each instance of Alacritty. If it is not present, alacritty will 22 | # check the local terminfo database and use `alacritty` if it is 23 | # available, otherwise `xterm-256color` is used. 24 | #TERM: alacritty 25 | 26 | window: 27 | # Window dimensions (changes require restart) 28 | # 29 | # Number of lines/columns (not pixels) in the terminal. The number of columns 30 | # must be at least `2`, while using a value of `0` for columns and lines will 31 | # fall back to the window manager's recommended size. 32 | #dimensions: 33 | # columns: 0 34 | # lines: 0 35 | 36 | # Window position (changes require restart) 37 | # 38 | # Specified in number of pixels. 39 | # If the position is not set, the window manager will handle the placement. 40 | position: 41 | x: 0 42 | y: 0 43 | 44 | # Window padding (changes require restart) 45 | # 46 | # Blank space added around the window in pixels. This padding is scaled 47 | # by DPI and the specified value is always added at both opposing sides. 48 | #padding: 49 | # x: 0 50 | # y: 0 51 | 52 | # Spread additional padding evenly around the terminal content. 53 | dynamic_padding: true 54 | 55 | # Window decorations 56 | # 57 | # Values for `decorations`: 58 | # - full: Borders and title bar 59 | # - none: Neither borders nor title bar 60 | # 61 | # Values for `decorations` (macOS only): 62 | # - transparent: Title bar, transparent background and title bar buttons 63 | # - buttonless: Title bar, transparent background and no title bar buttons 64 | decorations: none 65 | 66 | # Background opacity 67 | # 68 | # Window opacity as a floating point number from `0.0` to `1.0`. 69 | # The value `0.0` is completely transparent and `1.0` is opaque. 70 | opacity: 0.98 71 | 72 | # Startup Mode (changes require restart) 73 | # 74 | # Values for `startup_mode`: 75 | # - Windowed 76 | # - Maximized 77 | # - Fullscreen 78 | # 79 | # Values for `startup_mode` (macOS only): 80 | # - SimpleFullscreen 81 | startup_mode: Maximized 82 | 83 | # Window title 84 | #title: Alacritty 85 | 86 | # Allow terminal applications to change Alacritty's window title. 87 | #dynamic_title: true 88 | 89 | # Window class (Linux/BSD only): 90 | #class: 91 | # Application instance name 92 | #instance: Alacritty 93 | # General application class 94 | #general: Alacritty 95 | 96 | # GTK theme variant (Linux/BSD only) 97 | # 98 | # Override the variant of the GTK theme. Commonly supported values are `dark` 99 | # and `light`. Set this to `None` to use the default theme variant. 100 | #gtk_theme_variant: None 101 | 102 | #scrolling: 103 | # Maximum number of lines in the scrollback buffer. 104 | # Specifying '0' will disable scrolling. 105 | #history: 10000 106 | 107 | # Scrolling distance multiplier. 108 | #multiplier: 3 109 | 110 | # Font configuration 111 | font: 112 | # Normal (roman) font face 113 | normal: 114 | # Font family 115 | # 116 | # Default: 117 | # - (macOS) Menlo 118 | # - (Linux/BSD) monospace 119 | # - (Windows) Consolas 120 | #family: monospace 121 | #family: DejaVu Sans Mono for Powerline 122 | family: JetBrainsMono Nerd Font 123 | 124 | # The `style` can be specified to pick a specific face. 125 | #style: Regular 126 | 127 | # Bold font face 128 | #bold: 129 | # Font family 130 | # 131 | # If the bold family is not specified, it will fall back to the 132 | # value specified for the normal font. 133 | #family: monospace 134 | #family: DejaVu Sans Mono Bold for Powerline 135 | 136 | # The `style` can be specified to pick a specific face. 137 | #style: Bold 138 | 139 | # Italic font face 140 | #italic: 141 | # Font family 142 | # 143 | # If the italic family is not specified, it will fall back to the 144 | # value specified for the normal font. 145 | #family: monospace 146 | #family: DejaVu Sans Mono Oblique for Powerline 147 | 148 | # The `style` can be specified to pick a specific face. 149 | #style: Italic 150 | 151 | # Bold italic font face 152 | #bold_italic: 153 | # Font family 154 | # 155 | # If the bold italic family is not specified, it will fall back to the 156 | # value specified for the normal font. 157 | #family: monospace 158 | #family: DejaVu Sans Mono Bold Oblique for Powerline 159 | 160 | # The `style` can be specified to pick a specific face. 161 | #style: Bold Italic 162 | 163 | # Point size 164 | size: 14.0 165 | 166 | # Offset is the extra space around each character. `offset.y` can be thought 167 | # of as modifying the line spacing, and `offset.x` as modifying the letter 168 | # spacing. 169 | #offset: 170 | # x: 0 171 | # y: 0 172 | 173 | # Glyph offset determines the locations of the glyphs within their cells with 174 | # the default being at the bottom. Increasing `x` moves the glyph to the 175 | # right, increasing `y` moves the glyph upward. 176 | #glyph_offset: 177 | # x: 0 178 | # y: 0 179 | 180 | # Thin stroke font rendering (macOS only) 181 | # 182 | # Thin strokes are suitable for retina displays, but for non-retina screens 183 | # it is recommended to set `use_thin_strokes` to `false`. 184 | use_thin_strokes: true 185 | 186 | # Use built-in font for box drawing characters. 187 | # 188 | # If `true`, Alacritty will use a custom built-in font for box drawing 189 | # characters (Unicode points 2500 - 259f). 190 | # 191 | #builtin_box_drawing: true 192 | 193 | # If `true`, bold text is drawn using the bright color variants. 194 | #draw_bold_text_with_bright_colors: true 195 | 196 | # Colors (Tomorrow Night) 197 | #colors: 198 | # Default colors 199 | #primary: 200 | # background: '#1d1f21' 201 | # foreground: '#c5c8c6' 202 | 203 | # Bright and dim foreground colors 204 | # 205 | # The dimmed foreground color is calculated automatically if it is not 206 | # present. If the bright foreground color is not set, or 207 | # `draw_bold_text_with_bright_colors` is `false`, the normal foreground 208 | # color will be used. 209 | #dim_foreground: '#828482' 210 | #bright_foreground: '#eaeaea' 211 | 212 | # Cursor colors 213 | # 214 | # Colors which should be used to draw the terminal cursor. 215 | # 216 | # Allowed values are CellForeground/CellBackground, which reference the 217 | # affected cell, or hexadecimal colors like #ff00ff. 218 | #cursor: 219 | # text: CellBackground 220 | # cursor: CellForeground 221 | 222 | # Vi mode cursor colors 223 | # 224 | # Colors for the cursor when the vi mode is active. 225 | # 226 | # Allowed values are CellForeground/CellBackground, which reference the 227 | # affected cell, or hexadecimal colors like #ff00ff. 228 | #vi_mode_cursor: 229 | # text: CellBackground 230 | # cursor: CellForeground 231 | 232 | # Search colors 233 | # 234 | # Colors used for the search bar and match highlighting. 235 | #search: 236 | # Allowed values are CellForeground/CellBackground, which reference the 237 | # affected cell, or hexadecimal colors like #ff00ff. 238 | #matches: 239 | # foreground: '#000000' 240 | # background: '#ffffff' 241 | #focused_match: 242 | # foreground: '#ffffff' 243 | # background: '#000000' 244 | 245 | #bar: 246 | # background: '#c5c8c6' 247 | # foreground: '#1d1f21' 248 | 249 | # Keyboard regex hints 250 | #hints: 251 | # First character in the hint label 252 | # 253 | # Allowed values are CellForeground/CellBackground, which reference the 254 | # affected cell, or hexadecimal colors like #ff00ff. 255 | #start: 256 | # foreground: '#1d1f21' 257 | # background: '#e9ff5e' 258 | 259 | # All characters after the first one in the hint label 260 | # 261 | # Allowed values are CellForeground/CellBackground, which reference the 262 | # affected cell, or hexadecimal colors like #ff00ff. 263 | #end: 264 | # foreground: '#e9ff5e' 265 | # background: '#1d1f21' 266 | 267 | # Line indicator 268 | # 269 | # Color used for the indicator displaying the position in history during 270 | # search and vi mode. 271 | # 272 | # By default, these will use the opposing primary color. 273 | #line_indicator: 274 | # foreground: None 275 | # background: None 276 | 277 | # Selection colors 278 | # 279 | # Colors which should be used to draw the selection area. 280 | # 281 | # Allowed values are CellForeground/CellBackground, which reference the 282 | # affected cell, or hexadecimal colors like #ff00ff. 283 | #selection: 284 | # text: CellBackground 285 | # background: CellForeground 286 | 287 | # Normal colors 288 | #normal: 289 | # black: '#1d1f21' 290 | # red: '#cc6666' 291 | # green: '#b5bd68' 292 | # yellow: '#f0c674' 293 | # blue: '#81a2be' 294 | # magenta: '#b294bb' 295 | # cyan: '#8abeb7' 296 | # white: '#c5c8c6' 297 | 298 | # Bright colors 299 | #bright: 300 | # black: '#666666' 301 | # red: '#d54e53' 302 | # green: '#b9ca4a' 303 | # yellow: '#e7c547' 304 | # blue: '#7aa6da' 305 | # magenta: '#c397d8' 306 | # cyan: '#70c0b1' 307 | # white: '#eaeaea' 308 | 309 | # Dim colors 310 | # 311 | # If the dim colors are not set, they will be calculated automatically based 312 | # on the `normal` colors. 313 | #dim: 314 | # black: '#131415' 315 | # red: '#864343' 316 | # green: '#777c44' 317 | # yellow: '#9e824c' 318 | # blue: '#556a7d' 319 | # magenta: '#75617b' 320 | # cyan: '#5b7d78' 321 | # white: '#828482' 322 | 323 | # Indexed Colors 324 | # 325 | # The indexed colors include all colors from 16 to 256. 326 | # When these are not set, they're filled with sensible defaults. 327 | # 328 | # Example: 329 | # `- { index: 16, color: '#ff00ff' }` 330 | # 331 | #indexed_colors: [] 332 | 333 | # Transparent cell backgrounds 334 | # 335 | # Whether or not `window.opacity` applies to all cell backgrounds or only to 336 | # the default background. When set to `true` all cells will be transparent 337 | # regardless of their background color. 338 | #transparent_background_colors: false 339 | 340 | colors: 341 | # Default colors 342 | primary: 343 | background: '0x1e2127' 344 | foreground: '0xabb2bf' 345 | 346 | # Bright and dim foreground colors 347 | # 348 | # The dimmed foreground color is calculated automatically if it is not present. 349 | # If the bright foreground color is not set, or `draw_bold_text_with_bright_colors` 350 | # is `false`, the normal foreground color will be used. 351 | #dim_foreground: '0x9a9a9a' 352 | bright_foreground: '0xe6efff' 353 | 354 | # Cursor colors 355 | # 356 | # Colors which should be used to draw the terminal cursor. If these are unset, 357 | # the cursor color will be the inverse of the cell color. 358 | #cursor: 359 | # text: '0x000000' 360 | # cursor: '0xffffff' 361 | 362 | # Normal colors 363 | normal: 364 | black: '0x1e2127' 365 | red: '0xe06c75' 366 | green: '0x98c379' 367 | yellow: '0xd19a66' 368 | blue: '0x61afef' 369 | magenta: '0xc678dd' 370 | cyan: '0x56b6c2' 371 | white: '0x828791' 372 | 373 | # Bright colors 374 | bright: 375 | black: '0x5c6370' 376 | red: '0xe06c75' 377 | green: '0x98c379' 378 | yellow: '0xd19a66' 379 | blue: '0x61afef' 380 | magenta: '0xc678dd' 381 | cyan: '0x56b6c2' 382 | white: '0xe6efff' 383 | 384 | # Dim colors 385 | # 386 | # If the dim colors are not set, they will be calculated automatically based 387 | # on the `normal` colors. 388 | dim: 389 | black: '0x1e2127' 390 | red: '0xe06c75' 391 | green: '0x98c379' 392 | yellow: '0xd19a66' 393 | blue: '0x61afef' 394 | magenta: '0xc678dd' 395 | cyan: '0x56b6c2' 396 | white: '0x828791' 397 | 398 | # Indexed Colors 399 | # 400 | # The indexed colors include all colors from 16 to 256. 401 | # When these are not set, they're filled with sensible defaults. 402 | #indexed_colors: 403 | # - { index: 16, color: '0x000000' } 404 | 405 | # Bell 406 | # 407 | # The bell is rung every time the BEL control character is received. 408 | #bell: 409 | # Visual Bell Animation 410 | # 411 | # Animation effect for flashing the screen when the visual bell is rung. 412 | # 413 | # Values for `animation`: 414 | # - Ease 415 | # - EaseOut 416 | # - EaseOutSine 417 | # - EaseOutQuad 418 | # - EaseOutCubic 419 | # - EaseOutQuart 420 | # - EaseOutQuint 421 | # - EaseOutExpo 422 | # - EaseOutCirc 423 | # - Linear 424 | #animation: EaseOutExpo 425 | 426 | # Duration of the visual bell flash in milliseconds. A `duration` of `0` will 427 | # disable the visual bell animation. 428 | #duration: 0 429 | 430 | # Visual bell animation color. 431 | #color: '#ffffff' 432 | 433 | # Bell Command 434 | # 435 | # This program is executed whenever the bell is rung. 436 | # 437 | # When set to `command: None`, no command will be executed. 438 | # 439 | # Example: 440 | # command: 441 | # program: notify-send 442 | # args: ["Hello, World!"] 443 | # 444 | #command: None 445 | 446 | #selection: 447 | # This string contains all characters that are used as separators for 448 | # "semantic words" in Alacritty. 449 | #semantic_escape_chars: ",│`|:\"' ()[]{}<>\t" 450 | 451 | # When set to `true`, selected text will be copied to the primary clipboard. 452 | #save_to_clipboard: false 453 | 454 | #cursor: 455 | # Cursor style 456 | #style: 457 | # Cursor shape 458 | # 459 | # Values for `shape`: 460 | # - ▇ Block 461 | # - _ Underline 462 | # - | Beam 463 | #shape: Block 464 | 465 | # Cursor blinking state 466 | # 467 | # Values for `blinking`: 468 | # - Never: Prevent the cursor from ever blinking 469 | # - Off: Disable blinking by default 470 | # - On: Enable blinking by default 471 | # - Always: Force the cursor to always blink 472 | #blinking: Off 473 | 474 | # Vi mode cursor style 475 | # 476 | # If the vi mode cursor style is `None` or not specified, it will fall back to 477 | # the style of the active value of the normal cursor. 478 | # 479 | # See `cursor.style` for available options. 480 | #vi_mode_style: None 481 | 482 | # Cursor blinking interval in milliseconds. 483 | #blink_interval: 750 484 | 485 | # If this is `true`, the cursor will be rendered as a hollow box when the 486 | # window is not focused. 487 | #unfocused_hollow: true 488 | 489 | # Thickness of the cursor relative to the cell width as floating point number 490 | # from `0.0` to `1.0`. 491 | #thickness: 0.15 492 | 493 | # Live config reload (changes require restart) 494 | #live_config_reload: true 495 | 496 | # Shell 497 | # 498 | # You can set `shell.program` to the path of your favorite shell, e.g. 499 | # `/bin/fish`. Entries in `shell.args` are passed unmodified as arguments to the 500 | # shell. 501 | # 502 | # Default: 503 | # - (macOS) /bin/bash --login 504 | # - (Linux/BSD) user login shell 505 | # - (Windows) powershell 506 | #shell: 507 | # program: /bin/bash 508 | # args: 509 | # - --login 510 | 511 | # Startup directory 512 | # 513 | # Directory the shell is started in. If this is unset, or `None`, the working 514 | # directory of the parent process will be used. 515 | #working_directory: None 516 | 517 | # Send ESC (\x1b) before characters when alt is pressed. 518 | #alt_send_esc: true 519 | 520 | # Offer IPC using `alacritty msg` (unix only) 521 | #ipc_socket: true 522 | 523 | #mouse: 524 | # Click settings 525 | # 526 | # The `double_click` and `triple_click` settings control the time 527 | # alacritty should wait for accepting multiple clicks as one double 528 | # or triple click. 529 | #double_click: { threshold: 300 } 530 | #triple_click: { threshold: 300 } 531 | 532 | # If this is `true`, the cursor is temporarily hidden when typing. 533 | #hide_when_typing: false 534 | 535 | # Regex hints 536 | # 537 | # Terminal hints can be used to find text in the visible part of the terminal 538 | # and pipe it to other applications. 539 | #hints: 540 | # Keys used for the hint labels. 541 | #alphabet: "jfkdls;ahgurieowpq" 542 | 543 | # List with all available hints 544 | # 545 | # Each hint must have a `regex` and either an `action` or a `command` field. 546 | # The fields `mouse`, `binding` and `post_processing` are optional. 547 | # 548 | # The fields `command`, `binding.key`, `binding.mods`, `binding.mode` and 549 | # `mouse.mods` accept the same values as they do in the `key_bindings` section. 550 | # 551 | # The `mouse.enabled` field controls if the hint should be underlined while 552 | # the mouse with all `mouse.mods` keys held or the vi mode cursor is above it. 553 | # 554 | # If the `post_processing` field is set to `true`, heuristics will be used to 555 | # shorten the match if there are characters likely not to be part of the hint 556 | # (e.g. a trailing `.`). This is most useful for URIs. 557 | # 558 | # Values for `action`: 559 | # - Copy 560 | # Copy the hint's text to the clipboard. 561 | # - Paste 562 | # Paste the hint's text to the terminal or search. 563 | # - Select 564 | # Select the hint's text. 565 | # - MoveViModeCursor 566 | # Move the vi mode cursor to the beginning of the hint. 567 | #enabled: 568 | # - regex: "(ipfs:|ipns:|magnet:|mailto:|gemini:|gopher:|https:|http:|news:|file:|git:|ssh:|ftp:)\ 569 | # [^\u0000-\u001F\u007F-\u009F<>\"\\s{-}\\^⟨⟩`]+" 570 | # command: xdg-open 571 | # post_processing: true 572 | # mouse: 573 | # enabled: true 574 | # mods: None 575 | # binding: 576 | # key: U 577 | # mods: Control|Shift 578 | 579 | # Mouse bindings 580 | # 581 | # Mouse bindings are specified as a list of objects, much like the key 582 | # bindings further below. 583 | # 584 | # To trigger mouse bindings when an application running within Alacritty 585 | # captures the mouse, the `Shift` modifier is automatically added as a 586 | # requirement. 587 | # 588 | # Each mouse binding will specify a: 589 | # 590 | # - `mouse`: 591 | # 592 | # - Middle 593 | # - Left 594 | # - Right 595 | # - Numeric identifier such as `5` 596 | # 597 | # - `action` (see key bindings for actions not exclusive to mouse mode) 598 | # 599 | # - Mouse exclusive actions: 600 | # 601 | # - ExpandSelection 602 | # Expand the selection to the current mouse cursor location. 603 | # 604 | # And optionally: 605 | # 606 | # - `mods` (see key bindings) 607 | #mouse_bindings: 608 | # - { mouse: Right, action: ExpandSelection } 609 | # - { mouse: Right, mods: Control, action: ExpandSelection } 610 | # - { mouse: Middle, mode: ~Vi, action: PasteSelection } 611 | 612 | # Key bindings 613 | # 614 | # Key bindings are specified as a list of objects. For example, this is the 615 | # default paste binding: 616 | # 617 | # `- { key: V, mods: Control|Shift, action: Paste }` 618 | # 619 | # Each key binding will specify a: 620 | # 621 | # - `key`: Identifier of the key pressed 622 | # 623 | # - A-Z 624 | # - F1-F24 625 | # - Key0-Key9 626 | # 627 | # A full list with available key codes can be found here: 628 | # https://docs.rs/glutin/*/glutin/event/enum.VirtualKeyCode.html#variants 629 | # 630 | # Instead of using the name of the keys, the `key` field also supports using 631 | # the scancode of the desired key. Scancodes have to be specified as a 632 | # decimal number. This command will allow you to display the hex scancodes 633 | # for certain keys: 634 | # 635 | # `showkey --scancodes`. 636 | # 637 | # Then exactly one of: 638 | # 639 | # - `chars`: Send a byte sequence to the running application 640 | # 641 | # The `chars` field writes the specified string to the terminal. This makes 642 | # it possible to pass escape sequences. To find escape codes for bindings 643 | # like `PageUp` (`"\x1b[5~"`), you can run the command `showkey -a` outside 644 | # of tmux. Note that applications use terminfo to map escape sequences back 645 | # to keys. It is therefore required to update the terminfo when changing an 646 | # escape sequence. 647 | # 648 | # - `action`: Execute a predefined action 649 | # 650 | # - ToggleViMode 651 | # - SearchForward 652 | # Start searching toward the right of the search origin. 653 | # - SearchBackward 654 | # Start searching toward the left of the search origin. 655 | # - Copy 656 | # - Paste 657 | # - IncreaseFontSize 658 | # - DecreaseFontSize 659 | # - ResetFontSize 660 | # - ScrollPageUp 661 | # - ScrollPageDown 662 | # - ScrollHalfPageUp 663 | # - ScrollHalfPageDown 664 | # - ScrollLineUp 665 | # - ScrollLineDown 666 | # - ScrollToTop 667 | # - ScrollToBottom 668 | # - ClearHistory 669 | # Remove the terminal's scrollback history. 670 | # - Hide 671 | # Hide the Alacritty window. 672 | # - Minimize 673 | # Minimize the Alacritty window. 674 | # - Quit 675 | # Quit Alacritty. 676 | # - ToggleFullscreen 677 | # - SpawnNewInstance 678 | # Spawn a new instance of Alacritty. 679 | # - CreateNewWindow 680 | # Create a new Alacritty window from the current process. 681 | # - ClearLogNotice 682 | # Clear Alacritty's UI warning and error notice. 683 | # - ClearSelection 684 | # Remove the active selection. 685 | # - ReceiveChar 686 | # - None 687 | # 688 | # - Vi mode exclusive actions: 689 | # 690 | # - Open 691 | # Perform the action of the first matching hint under the vi mode cursor 692 | # with `mouse.enabled` set to `true`. 693 | # - ToggleNormalSelection 694 | # - ToggleLineSelection 695 | # - ToggleBlockSelection 696 | # - ToggleSemanticSelection 697 | # Toggle semantic selection based on `selection.semantic_escape_chars`. 698 | # 699 | # - Vi mode exclusive cursor motion actions: 700 | # 701 | # - Up 702 | # One line up. 703 | # - Down 704 | # One line down. 705 | # - Left 706 | # One character left. 707 | # - Right 708 | # One character right. 709 | # - First 710 | # First column, or beginning of the line when already at the first column. 711 | # - Last 712 | # Last column, or beginning of the line when already at the last column. 713 | # - FirstOccupied 714 | # First non-empty cell in this terminal row, or first non-empty cell of 715 | # the line when already at the first cell of the row. 716 | # - High 717 | # Top of the screen. 718 | # - Middle 719 | # Center of the screen. 720 | # - Low 721 | # Bottom of the screen. 722 | # - SemanticLeft 723 | # Start of the previous semantically separated word. 724 | # - SemanticRight 725 | # Start of the next semantically separated word. 726 | # - SemanticLeftEnd 727 | # End of the previous semantically separated word. 728 | # - SemanticRightEnd 729 | # End of the next semantically separated word. 730 | # - WordLeft 731 | # Start of the previous whitespace separated word. 732 | # - WordRight 733 | # Start of the next whitespace separated word. 734 | # - WordLeftEnd 735 | # End of the previous whitespace separated word. 736 | # - WordRightEnd 737 | # End of the next whitespace separated word. 738 | # - Bracket 739 | # Character matching the bracket at the cursor's location. 740 | # - SearchNext 741 | # Beginning of the next match. 742 | # - SearchPrevious 743 | # Beginning of the previous match. 744 | # - SearchStart 745 | # Start of the match to the left of the vi mode cursor. 746 | # - SearchEnd 747 | # End of the match to the right of the vi mode cursor. 748 | # 749 | # - Search mode exclusive actions: 750 | # - SearchFocusNext 751 | # Move the focus to the next search match. 752 | # - SearchFocusPrevious 753 | # Move the focus to the previous search match. 754 | # - SearchConfirm 755 | # - SearchCancel 756 | # - SearchClear 757 | # Reset the search regex. 758 | # - SearchDeleteWord 759 | # Delete the last word in the search regex. 760 | # - SearchHistoryPrevious 761 | # Go to the previous regex in the search history. 762 | # - SearchHistoryNext 763 | # Go to the next regex in the search history. 764 | # 765 | # - macOS exclusive actions: 766 | # - ToggleSimpleFullscreen 767 | # Enter fullscreen without occupying another space. 768 | # 769 | # - Linux/BSD exclusive actions: 770 | # 771 | # - CopySelection 772 | # Copy from the selection buffer. 773 | # - PasteSelection 774 | # Paste from the selection buffer. 775 | # 776 | # - `command`: Fork and execute a specified command plus arguments 777 | # 778 | # The `command` field must be a map containing a `program` string and an 779 | # `args` array of command line parameter strings. For example: 780 | # `{ program: "alacritty", args: ["-e", "vttest"] }` 781 | # 782 | # And optionally: 783 | # 784 | # - `mods`: Key modifiers to filter binding actions 785 | # 786 | # - Command 787 | # - Control 788 | # - Option 789 | # - Super 790 | # - Shift 791 | # - Alt 792 | # 793 | # Multiple `mods` can be combined using `|` like this: 794 | # `mods: Control|Shift`. 795 | # Whitespace and capitalization are relevant and must match the example. 796 | # 797 | # - `mode`: Indicate a binding for only specific terminal reported modes 798 | # 799 | # This is mainly used to send applications the correct escape sequences 800 | # when in different modes. 801 | # 802 | # - AppCursor 803 | # - AppKeypad 804 | # - Search 805 | # - Alt 806 | # - Vi 807 | # 808 | # A `~` operator can be used before a mode to apply the binding whenever 809 | # the mode is *not* active, e.g. `~Alt`. 810 | # 811 | # Bindings are always filled by default, but will be replaced when a new 812 | # binding with the same triggers is defined. To unset a default binding, it can 813 | # be mapped to the `ReceiveChar` action. Alternatively, you can use `None` for 814 | # a no-op if you do not wish to receive input characters for that binding. 815 | # 816 | # If the same trigger is assigned to multiple actions, all of them are executed 817 | # in the order they were defined in. 818 | key_bindings: 819 | # option-arrow, option-fb keys to jump words 820 | - { key: Right, mods: Alt, chars: "\x1BF" } 821 | - { key: Left, mods: Alt, chars: "\x1BB" } 822 | - { key: F, mods: Alt, chars: "\x1BF" } 823 | - { key: B, mods: Alt, chars: "\x1BB" } 824 | #- { key: Paste, action: Paste } 825 | #- { key: Copy, action: Copy } 826 | #- { key: L, mods: Control, action: ClearLogNotice } 827 | #- { key: L, mods: Control, mode: ~Vi|~Search, chars: "\x0c" } 828 | #- { key: PageUp, mods: Shift, mode: ~Alt, action: ScrollPageUp, } 829 | #- { key: PageDown, mods: Shift, mode: ~Alt, action: ScrollPageDown } 830 | #- { key: Home, mods: Shift, mode: ~Alt, action: ScrollToTop, } 831 | #- { key: End, mods: Shift, mode: ~Alt, action: ScrollToBottom } 832 | 833 | # Vi Mode 834 | #- { key: Space, mods: Shift|Control, mode: ~Search, action: ToggleViMode } 835 | #- { key: Space, mods: Shift|Control, mode: Vi|~Search, action: ScrollToBottom } 836 | #- { key: Escape, mode: Vi|~Search, action: ClearSelection } 837 | #- { key: I, mode: Vi|~Search, action: ToggleViMode } 838 | #- { key: I, mode: Vi|~Search, action: ScrollToBottom } 839 | #- { key: C, mods: Control, mode: Vi|~Search, action: ToggleViMode } 840 | #- { key: Y, mods: Control, mode: Vi|~Search, action: ScrollLineUp } 841 | #- { key: E, mods: Control, mode: Vi|~Search, action: ScrollLineDown } 842 | #- { key: G, mode: Vi|~Search, action: ScrollToTop } 843 | #- { key: G, mods: Shift, mode: Vi|~Search, action: ScrollToBottom } 844 | #- { key: B, mods: Control, mode: Vi|~Search, action: ScrollPageUp } 845 | #- { key: F, mods: Control, mode: Vi|~Search, action: ScrollPageDown } 846 | #- { key: U, mods: Control, mode: Vi|~Search, action: ScrollHalfPageUp } 847 | #- { key: D, mods: Control, mode: Vi|~Search, action: ScrollHalfPageDown } 848 | #- { key: Y, mode: Vi|~Search, action: Copy } 849 | #- { key: Y, mode: Vi|~Search, action: ClearSelection } 850 | #- { key: Copy, mode: Vi|~Search, action: ClearSelection } 851 | #- { key: V, mode: Vi|~Search, action: ToggleNormalSelection } 852 | #- { key: V, mods: Shift, mode: Vi|~Search, action: ToggleLineSelection } 853 | #- { key: V, mods: Control, mode: Vi|~Search, action: ToggleBlockSelection } 854 | #- { key: V, mods: Alt, mode: Vi|~Search, action: ToggleSemanticSelection } 855 | #- { key: Return, mode: Vi|~Search, action: Open } 856 | #- { key: K, mode: Vi|~Search, action: Up } 857 | #- { key: J, mode: Vi|~Search, action: Down } 858 | #- { key: H, mode: Vi|~Search, action: Left } 859 | #- { key: L, mode: Vi|~Search, action: Right } 860 | #- { key: Up, mode: Vi|~Search, action: Up } 861 | #- { key: Down, mode: Vi|~Search, action: Down } 862 | #- { key: Left, mode: Vi|~Search, action: Left } 863 | #- { key: Right, mode: Vi|~Search, action: Right } 864 | #- { key: Key0, mode: Vi|~Search, action: First } 865 | #- { key: Key4, mods: Shift, mode: Vi|~Search, action: Last } 866 | #- { key: Key6, mods: Shift, mode: Vi|~Search, action: FirstOccupied } 867 | #- { key: H, mods: Shift, mode: Vi|~Search, action: High } 868 | #- { key: M, mods: Shift, mode: Vi|~Search, action: Middle } 869 | #- { key: L, mods: Shift, mode: Vi|~Search, action: Low } 870 | #- { key: B, mode: Vi|~Search, action: SemanticLeft } 871 | #- { key: W, mode: Vi|~Search, action: SemanticRight } 872 | #- { key: E, mode: Vi|~Search, action: SemanticRightEnd } 873 | #- { key: B, mods: Shift, mode: Vi|~Search, action: WordLeft } 874 | #- { key: W, mods: Shift, mode: Vi|~Search, action: WordRight } 875 | #- { key: E, mods: Shift, mode: Vi|~Search, action: WordRightEnd } 876 | #- { key: Key5, mods: Shift, mode: Vi|~Search, action: Bracket } 877 | #- { key: Slash, mode: Vi|~Search, action: SearchForward } 878 | #- { key: Slash, mods: Shift, mode: Vi|~Search, action: SearchBackward } 879 | #- { key: N, mode: Vi|~Search, action: SearchNext } 880 | #- { key: N, mods: Shift, mode: Vi|~Search, action: SearchPrevious } 881 | 882 | # Search Mode 883 | #- { key: Return, mode: Search|Vi, action: SearchConfirm } 884 | #- { key: Escape, mode: Search, action: SearchCancel } 885 | #- { key: C, mods: Control, mode: Search, action: SearchCancel } 886 | #- { key: U, mods: Control, mode: Search, action: SearchClear } 887 | #- { key: W, mods: Control, mode: Search, action: SearchDeleteWord } 888 | #- { key: P, mods: Control, mode: Search, action: SearchHistoryPrevious } 889 | #- { key: N, mods: Control, mode: Search, action: SearchHistoryNext } 890 | #- { key: Up, mode: Search, action: SearchHistoryPrevious } 891 | #- { key: Down, mode: Search, action: SearchHistoryNext } 892 | #- { key: Return, mode: Search|~Vi, action: SearchFocusNext } 893 | #- { key: Return, mods: Shift, mode: Search|~Vi, action: SearchFocusPrevious } 894 | 895 | # (Windows, Linux, and BSD only) 896 | #- { key: V, mods: Control|Shift, mode: ~Vi, action: Paste } 897 | #- { key: C, mods: Control|Shift, action: Copy } 898 | #- { key: F, mods: Control|Shift, mode: ~Search, action: SearchForward } 899 | #- { key: B, mods: Control|Shift, mode: ~Search, action: SearchBackward } 900 | #- { key: C, mods: Control|Shift, mode: Vi|~Search, action: ClearSelection } 901 | #- { key: Insert, mods: Shift, action: PasteSelection } 902 | #- { key: Key0, mods: Control, action: ResetFontSize } 903 | #- { key: Equals, mods: Control, action: IncreaseFontSize } 904 | #- { key: Plus, mods: Control, action: IncreaseFontSize } 905 | #- { key: NumpadAdd, mods: Control, action: IncreaseFontSize } 906 | #- { key: Minus, mods: Control, action: DecreaseFontSize } 907 | #- { key: NumpadSubtract, mods: Control, action: DecreaseFontSize } 908 | 909 | # (Windows only) 910 | #- { key: Return, mods: Alt, action: ToggleFullscreen } 911 | 912 | # (macOS only) 913 | #- { key: K, mods: Command, mode: ~Vi|~Search, chars: "\x0c" } 914 | #- { key: K, mods: Command, mode: ~Vi|~Search, action: ClearHistory } 915 | #- { key: Key0, mods: Command, action: ResetFontSize } 916 | #- { key: Equals, mods: Command, action: IncreaseFontSize } 917 | #- { key: Plus, mods: Command, action: IncreaseFontSize } 918 | #- { key: NumpadAdd, mods: Command, action: IncreaseFontSize } 919 | #- { key: Minus, mods: Command, action: DecreaseFontSize } 920 | #- { key: NumpadSubtract, mods: Command, action: DecreaseFontSize } 921 | #- { key: V, mods: Command, action: Paste } 922 | #- { key: C, mods: Command, action: Copy } 923 | #- { key: C, mods: Command, mode: Vi|~Search, action: ClearSelection } 924 | #- { key: H, mods: Command, action: Hide } 925 | #- { key: H, mods: Command|Alt, action: HideOtherApplications } 926 | #- { key: M, mods: Command, action: Minimize } 927 | #- { key: Q, mods: Command, action: Quit } 928 | #- { key: W, mods: Command, action: Quit } 929 | #- { key: N, mods: Command, action: SpawnNewInstance } 930 | #- { key: F, mods: Command|Control, action: ToggleFullscreen } 931 | #- { key: F, mods: Command, mode: ~Search, action: SearchForward } 932 | #- { key: B, mods: Command, mode: ~Search, action: SearchBackward } 933 | 934 | #debug: 935 | # Display the time it takes to redraw each frame. 936 | #render_timer: false 937 | 938 | # Keep the log file after quitting Alacritty. 939 | #persistent_logging: false 940 | 941 | # Log level 942 | # 943 | # Values for `log_level`: 944 | # - Off 945 | # - Error 946 | # - Warn 947 | # - Info 948 | # - Debug 949 | # - Trace 950 | #log_level: Warn 951 | 952 | # Print all received window events. 953 | #print_events: false 954 | --------------------------------------------------------------------------------