From 5da7b528220d7501601a913636145215cc0f837c Mon Sep 17 00:00:00 2001 From: Philipp Krones Date: Tue, 18 Jun 2024 16:20:18 +0200 Subject: [PATCH] Rewrite init.vim to init.lua. nvim --- alacritty.toml | 2 +- coc-settings.json | 29 ------ ftplugin/changelog.lua | 1 + ftplugin/gitcommit.lua | 2 + ftplugin/go.lua | 1 + ftplugin/markdown.lua | 2 + ftplugin/plaintex.lua | 2 + ftplugin/text.lua | 1 + init.lua | 23 ++++ init.vim | 232 ----------------------------------------- install | 15 +-- lua/keymaps.lua | 46 ++++++++ lua/lsp.lua | 59 +++++++++++ lua/plugins.lua | 52 +++++++++ lua/settings.lua | 111 ++++++++++++++++++++ plugins.vim | 38 ------- tmux.conf | 3 +- 17 files changed, 306 insertions(+), 313 deletions(-) delete mode 100644 coc-settings.json create mode 100644 ftplugin/changelog.lua create mode 100644 ftplugin/gitcommit.lua create mode 100644 ftplugin/go.lua create mode 100644 ftplugin/markdown.lua create mode 100644 ftplugin/plaintex.lua create mode 100644 ftplugin/text.lua create mode 100644 init.lua delete mode 100644 init.vim create mode 100644 lua/keymaps.lua create mode 100644 lua/lsp.lua create mode 100644 lua/plugins.lua create mode 100644 lua/settings.lua delete mode 100644 plugins.vim diff --git a/alacritty.toml b/alacritty.toml index 54bd0e9..0a01e33 100644 --- a/alacritty.toml +++ b/alacritty.toml @@ -23,7 +23,7 @@ background = "0x002b36" foreground = "0x839496" [env] -TERM = "screen-256color" +TERM = "xterm-256color" [font] size = 10 diff --git a/coc-settings.json b/coc-settings.json deleted file mode 100644 index 7ce2b89..0000000 --- a/coc-settings.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "suggest.noselect": true, - "coc.preferences.formatOnSave": true, - "rust-analyzer.check.extraArgs": [ - "--target-dir", - "target/rust-analyzer" - ], - "rust-analyzer.check.features": "all", - "rust-analyzer.rustc.source": "discover", - "python.formatting.provider": "ruff", - "languageserver": { - "bash": { - "command": "bash-language-server", - "args": [ - "start" - ], - "filetypes": [ - "sh" - ], - "ignoredRootPaths": [ - "~" - ] - } - }, - "zig.zls.path": "/home/pkrones/.config/coc/extensions/coc-zls-data/zls_install/zls", - "zig.zls.warnStyle": true, - "zig.zls.enableInlayHints": true, - "zig.formattingProvider": "zls" -} diff --git a/ftplugin/changelog.lua b/ftplugin/changelog.lua new file mode 100644 index 0000000..b01850c --- /dev/null +++ b/ftplugin/changelog.lua @@ -0,0 +1 @@ +vim.o.spell = true diff --git a/ftplugin/gitcommit.lua b/ftplugin/gitcommit.lua new file mode 100644 index 0000000..24cb671 --- /dev/null +++ b/ftplugin/gitcommit.lua @@ -0,0 +1,2 @@ +vim.o.spell = true +vim.o.textwidth = 80 diff --git a/ftplugin/go.lua b/ftplugin/go.lua new file mode 100644 index 0000000..8a1e83f --- /dev/null +++ b/ftplugin/go.lua @@ -0,0 +1 @@ +vim.o.expandtab = false diff --git a/ftplugin/markdown.lua b/ftplugin/markdown.lua new file mode 100644 index 0000000..24cb671 --- /dev/null +++ b/ftplugin/markdown.lua @@ -0,0 +1,2 @@ +vim.o.spell = true +vim.o.textwidth = 80 diff --git a/ftplugin/plaintex.lua b/ftplugin/plaintex.lua new file mode 100644 index 0000000..24cb671 --- /dev/null +++ b/ftplugin/plaintex.lua @@ -0,0 +1,2 @@ +vim.o.spell = true +vim.o.textwidth = 80 diff --git a/ftplugin/text.lua b/ftplugin/text.lua new file mode 100644 index 0000000..6ae2d3c --- /dev/null +++ b/ftplugin/text.lua @@ -0,0 +1 @@ +vim.o.textwidth = 80 diff --git a/init.lua b/init.lua new file mode 100644 index 0000000..d49539b --- /dev/null +++ b/init.lua @@ -0,0 +1,23 @@ +-- plugin manager +local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" +if not (vim.uv or vim.loop).fs_stat(lazypath) then + vim.fn.system({ + "git", + "clone", + "--filter=blob:none", + "https://github.com/folke/lazy.nvim.git", + "--branch=stable", -- latest stable release + lazypath, + }) +end +vim.opt.rtp:prepend(lazypath) + +-- nvim-tree +-- disable netrw at the very start of your init.lua +vim.g.loaded_netrw = 1 +vim.g.loaded_netrwPlugin = 1 + +require('plugins') +require('settings') +require('lsp') +require('keymaps') diff --git a/init.vim b/init.vim deleted file mode 100644 index b2ccf27..0000000 --- a/init.vim +++ /dev/null @@ -1,232 +0,0 @@ -" Plugins {{{1 -if filereadable(expand("~/.config/nvim/plugins.vim")) - source ~/.config/nvim/plugins.vim -endif - -" Appearance {{{1 -set number -set relativenumber -set numberwidth=3 - -" Keybindings {{{1 -let mapleader="," - -" Reload vnim config -noremap :source ~/.config/nvim/init.vim - -" Copy to clipboard -noremap y "+y - -" NERDTree -noremap :NERDTreeToggle -noremap :NERDTreeFind - -" fzf -noremap b :Buffer -noremap h :History -noremap r :Rg -noremap f :exe ':Rg ' . expand('') - -" Save/Close -nnoremap q :q -nnoremap w :update - -" Wrapped line navigation -nnoremap j gj -nnoremap k gk - -" Window navigation -nnoremap j -nnoremap k -nnoremap h -nnoremap l - -" Fold close -nnoremap cf :foldclose - -" coc.nvim {{{1 -set shortmess+=c -set signcolumn=yes -set statusline^=%{coc#status()} -nnoremap coc#float#has_scroll() ? coc#float#scroll(1) : "\" -nnoremap coc#float#has_scroll() ? coc#float#scroll(0) : "\" -inoremap coc#float#has_scroll() ? "\=coc#float#scroll(1)\" : "\" -inoremap coc#float#has_scroll() ? "\=coc#float#scroll(0)\" : "\" - -function! CheckBackSpace() abort - let col = col('.') - 1 - return !col || getline('.')[col - 1] =~ '\s' -endfunction - -" Insert when previous text is space, refresh completion if not. -inoremap coc#pum#visible() ? coc#pum#next(1) : copilot#Accept("\") -inoremap coc#pum#visible() ? coc#pum#prev(1) : "\" - -" Use to confirm completion -inoremap coc#pum#visible() ? coc#_select_confirm() : "\" - -" Use for trigger snippet expand. -imap (coc-snippets-expand) - -" Use to trigger completion. -inoremap coc#refresh() - -" Use `gnd` and `gpd` to navigate diagnostics -nmap gnd (coc-diagnostic-next) -nmap gpd (coc-diagnostic-prev) -nmap gne (coc-diagnostic-next-error) -nmap gpe (coc-diagnostic-prev-error) - -" GoTo code navigation. -nmap gd (coc-definition) -nmap gt (coc-type-definition) -nmap gi (coc-implementation) -nmap gr (coc-references) - -" Use H to show documentation in preview window. -nnoremap H :call show_documentation() - -function! s:show_documentation() - if (index(['vim','help'], &filetype) >= 0) - execute 'h '.expand('') - else - call CocAction('doHover') - endif -endfunction - -" Highlight the symbol and its references when holding the cursor. -autocmd CursorHold * silent call CocActionAsync('highlight') - -" Symbol renaming. -nmap (coc-rename) - -" Applying codeAction to the selected region. -nmap a (coc-codeaction-selected) -" Apply AutoFix to problem on the current line. -nmap x (coc-fix-current) - -" Copilot {{{1 -let g:copilot_no_tab_map = v:true - -" Go {{{1 -au FileType go set noexpandtab - -" Python {{{1 -let g:python3_host_prog = '/home/pkrones/.local/share/virtualenvs/dotfiles-*/bin/python' - -" NERDTree {{{1 -let g:NERDTreeWinSize=31 - -" rust.vim {{{1 -let g:rustfmt_autosave_if_config_present = 1 -let g:rustc_clip_command = 'xclip -selection clipboard' -let g:rustfmt_command = 'rustup run nightly rustfmt' - -" Spellcheck {{{1 -set spelllang=en_us,de_de - -" Statusline {{{1 -function! GitBranch() - let l:branch = system("git rev-parse --abbrev-ref HEAD 2>/dev/null | tr -d '\n'") - return strlen(l:branch) > 0 ? ' ' . l:branch . ' ' : '' -endfunction - -hi StatusLineBranch cterm=bold ctermfg=Black ctermbg=LightGrey -hi StatusLineFile ctermfg=LightGrey ctermbg=Blue -hi StatusLineRight ctermfg=15 ctermbg=DarkGrey -hi StatusLineEmpty ctermfg=0 ctermbg=0 - -set statusline= -set statusline+=%#StatusLine# -set statusline+=%{GitBranch()} -set statusline+=%#StatusLineFile# -set statusline+=\ %f%m%r -set statusline+=\ %#StatusLineEmpty# -set statusline+=%= -set statusline+=%#StatusLineRight# -set statusline+=\ %y -set statusline+=\ %{&fileencoding?&fileencoding:&encoding}\[%{&fileformat}\] -set statusline+=\ %l/%L\ (%p%%):%c\ | - -" Usability {{{1 -set splitbelow -set splitright - -set foldmethod=marker - -let loaded_matchit = 1 - -set hidden - -set ignorecase -set smartcase - -set cmdheight=2 - -set updatetime=300 - -set mouse= - -function! s:RemoveTrailingWhitespaces() - "Save last cursor position - let l = line(".") - let c = col(".") - - %s/\s\+$//ge - - call cursor(l,c) -endfunction - -function! AdjustWindowHeight(minheight, maxheight) - let l = 1 - let n_lines = 0 - let w_width = winwidth(0) - while l <= line('$') - " number to float for division - let l_len = strlen(getline(l)) + 0.0 - let line_width = l_len/w_width - let n_lines += float2nr(ceil(line_width)) - let l += 1 - endw - exe max([min([n_lines, a:maxheight]), a:minheight]) . "wincmd _" -endfunction - -augroup vimrcEx - autocmd! - - " When editing a file, always jump to the last known cursor position. - " Don't do it for commit messages, when the position is invalid, or when - " inside an event handler (happens when dropping a file on gvim). - autocmd BufReadPost * - \ if &ft != 'gitcommit' && line("'\"") > 0 && line("'\"") <= line("$") | - \ exe "normal g`\"" | - \ endif - - " Enable spellchecking - autocmd FileType markdown setlocal spell - autocmd FileType plaintex setlocal spell - autocmd FileType gitcommit setlocal spell - autocmd FileType changelog setlocal spell - - " Automatically wrap at 80 characters for text files - autocmd FileType text setlocal textwidth=80 - autocmd FileType markdown setlocal textwidth=80 - autocmd FileType plaintex setlocal textwidth=80 - autocmd FileType gitcommit setlocal textwidth=80 - - " Adjust quickfix window size - autocmd FileType qf call AdjustWindowHeight(0, 7) - - " Remove trailing whitespace on save - autocmd BufWritePre * :call RemoveTrailingWhitespaces() -augroup END - -" vim-tmux-navigator {{{1 -let g:tmux_navigator_save_on_switch = 1 - -" Whitespace {{{1 -set expandtab -set shiftwidth=4 -set tabstop=4 -set list -set listchars=tab:»·,trail:· diff --git a/install b/install index bf8a2af..46feaf9 100755 --- a/install +++ b/install @@ -15,11 +15,10 @@ ln -s -f "$HOME/dotfiles/zshenv" "$HOME/.zshenv" ln -s -f "$HOME/dotfiles/zcomp" "$HOME/.zcomp" ## vim mkdir -p "$HOME/.config/nvim" -ln -s -f "$HOME/dotfiles/init.vim" "$HOME/.config/nvim/init.vim" -ln -s -f "$HOME/dotfiles/plugins.vim" "$HOME/.config/nvim/plugins.vim" -ln -s -f "$HOME/dotfiles/coc-settings.json" "$HOME/.config/nvim/coc-settings.json" +ln -s -f "$HOME/dotfiles/init.lua" "$HOME/.config/nvim/init.lua" +ln -s -f "$HOME/dotfiles/lua" "$HOME/.config/nvim/" +ln -s -f "$HOME/dotfiles/ftplugin" "$HOME/.config/nvim/" ln -s -f "$HOME/dotfiles/spell" "$HOME/.config/nvim/" -ln -s -f "$HOME/dotfiles/init.vim" "$HOME/.vimrc" ln -s -f "$HOME/dotfiles/Pipfile" "$HOME/.config/nvim/Pipfile" ## git ln -s -f "$HOME/dotfiles/gitconfig" "$HOME/.gitconfig" @@ -34,14 +33,6 @@ ln -s -f "$HOME/dotfiles/ripgreprc" "$HOME/.ripgreprc" echo "Symlinks successfully created for ~/dotfiles." -# Install fonts -if ! fc-list | grep -i "Source Code Pro.*.otf" >/dev/null; then - git clone https://github.com/powerline/fonts.git "$HOME/fonts" - sh "$HOME/fonts/install.sh" - echo "Set your terminal font to 'Source Code Pro'." - rm -rf "$HOME/fonts" -fi - if command -v pipenv &> /dev/null; then pushd "$HOME/.config/nvim" || exit 0 pipenv install diff --git a/lua/keymaps.lua b/lua/keymaps.lua new file mode 100644 index 0000000..731d70f --- /dev/null +++ b/lua/keymaps.lua @@ -0,0 +1,46 @@ +local map = vim.api.nvim_set_keymap +local opts = { noremap = true, silent = true } + +vim.g.mapleader = ',' + +-- Reload init.lua +map('n', '', ':luafile ~/.config/nvim/init.lua', opts) + +-- Copy to clipboard +map('', 'y', '"+y', opts) + +-- nvim-tree +map('n', '', ':NvimTreeToggle', opts) +map('n', '', ':NvimTreeFindFile', opts) + +-- fzf +map('n', 'b', ':Buffer', opts) +map('n', 'h', ':History', opts) +map('n', 'r', ':Rg', opts) +map('n', 'f', ":exe ':Rg' expand('')", opts) + +-- Save/Close +map('n', 'q', ':q', opts) +map('n', 'w', ':update', opts) + +-- Wrapped line navigation +map('n', 'j', 'gj', opts) +map('n', 'k', 'gk', opts) + +-- LSP +map('n', 'gpd', 'lua vim.diagnostic.goto_prev()', opts) +map('n', 'gnd', 'lua vim.diagnostic.goto_next()', opts) +map('n', 'gpe', 'lua vim.diagnostic.goto_prev({ severity = vim.diagnostic.severity.ERROR })', opts) +map('n', 'gne', 'lua vim.diagnostic.goto_next({ severity = vim.diagnostic.severity.ERROR })', opts) + +map('n', 'gD', 'lua vim.lsp.buf.declaration()', opts) +map('n', 'gd', 'lua vim.lsp.buf.definition()', opts) +map('n', 'gi', 'lua vim.lsp.buf.implementation()', opts) +map('n', 'gt', 'lua vim.lsp.buf.type_definition()', opts) +map('n', 'gr', ":lua require'telescope.builtin'.lsp_references{}", opts) + +map('n', 'H', 'lua vim.lsp.buf.hover()', opts) +map('n', '', 'lua vim.lsp.buf.rename()', opts) + +map('n', 'a', 'lua vim.lsp.buf.code_action()', opts) +map('n', 't', ':ClangdSwitchSourceHeader', opts) diff --git a/lua/lsp.lua b/lua/lsp.lua new file mode 100644 index 0000000..49e20fd --- /dev/null +++ b/lua/lsp.lua @@ -0,0 +1,59 @@ +local cmp = require('cmp') +local luasnip = require('luasnip') + +cmp.setup({ + snippet = { + expand = function(args) + luasnip.lsp_expand(args.body) + end, + }, + mapping = cmp.mapping.preset.insert({ + [''] = cmp.mapping.scroll_docs(-4), + [''] = cmp.mapping.scroll_docs(4), + [''] = cmp.mapping.complete(), + [''] = cmp.mapping.abort(), + [''] = cmp.mapping.confirm({ select = true }), + [""] = cmp.mapping(function(fallback) + if cmp.visible() then + cmp.select_next_item() + elseif luasnip.expand_or_jumpable() then + luasnip.expand_or_jump() + else + fallback() + end + end, { "i", "s" }), + [""] = cmp.mapping(function(fallback) + if cmp.visible() then + cmp.select_prev_item() + elseif luasnip.jumpable(-1) then + luasnip.jump(-1) + else + fallback() + end + end, { "i", "s" }), + }), + sources = cmp.config.sources({ + { name = 'nvim_lsp' }, + { name = 'luasnip' }, + }, { + { name = 'buffer' }, + }) +}) + +require('neodev').setup() + +vim.lsp.inlay_hint.enable(true) + +require('mason').setup({ + ui = { icons = { package_installed = "", package_pending = "", package_uninstalled = "" } } +}) +local mason_lspconfig = require('mason-lspconfig') +mason_lspconfig.setup() +mason_lspconfig.setup_handlers({ + function(server_name) + require('lspconfig')[server_name].setup({}) + end, + ['clangd'] = function() + require('lspconfig').clangd.setup({ cmd = { 'clangd', '--background-index', '-j', '5', '--clang-tidy' } }) + end, +}) diff --git a/lua/plugins.lua b/lua/plugins.lua new file mode 100644 index 0000000..d4ae530 --- /dev/null +++ b/lua/plugins.lua @@ -0,0 +1,52 @@ +require('lazy').setup({ + -- tmux integration + { + "christoomey/vim-tmux-navigator", + cmd = { + "TmuxNavigateLeft", + "TmuxNavigateDown", + "TmuxNavigateUp", + "TmuxNavigateRight", + }, + keys = { + { "", "TmuxNavigateLeft" }, + { "", "TmuxNavigateDown" }, + { "", "TmuxNavigateUp" }, + { "", "TmuxNavigateRight" }, + }, + }, + -- nvim tree + 'nvim-tree/nvim-tree.lua', + 'nvim-tree/nvim-web-devicons', + -- easy typing/editing + 'tpope/vim-surround', + 'jiangmiao/auto-pairs', + 'tomtom/tcomment_vim', + -- fxf + { 'junegunn/fzf', dir = '~/.fzf', build = './install --all' }, + 'junegunn/fzf.vim', + -- LSP + 'williamboman/mason.nvim', + 'williamboman/mason-lspconfig.nvim', + 'neovim/nvim-lspconfig', + 'folke/neodev.nvim', + { + 'nvim-telescope/telescope.nvim', + dependencies = { 'nvim-lua/plenary.nvim' } + }, + -- Completion + 'hrsh7th/cmp-nvim-lsp', + 'hrsh7th/cmp-buffer', + 'hrsh7th/cmp-path', + 'hrsh7th/cmp-cmdline', + 'hrsh7th/nvim-cmp', + 'L3MON4D3/LuaSnip', + 'saadparwaiz1/cmp_luasnip', + -- Copilot + 'github/copilot.vim', + -- git + 'airblade/vim-gitgutter', + -- style + "Tsuzat/NeoSolarized.nvim", + 'nvim-lualine/lualine.nvim', +}) diff --git a/lua/settings.lua b/lua/settings.lua new file mode 100644 index 0000000..d7d35b4 --- /dev/null +++ b/lua/settings.lua @@ -0,0 +1,111 @@ +-- Appearance +vim.o.number = true +vim.o.relativenumber = true +vim.o.numberwidth = 3 +local NeoSolarized = require('NeoSolarized') + +NeoSolarized.setup({ + transparent = false, +}) + +vim.cmd('colorscheme NeoSolarized') + +-- Python +vim.g.python3_host_prog = '/home/pkrones/.local/share/virtualenvs/dotfiles-*/bin/python' + +local function nvim_tree_attach(bufnr) + local api = require('nvim-tree.api') + local function opts(desc) + return { desc = "nvim-tree: " .. desc, buffer = bufnr, noremap = true, silent = true, nowait = true } + end + + api.config.mappings.default_on_attach(bufnr) + + vim.keymap.set('n', '?', api.tree.toggle_help, opts('help')) + vim.keymap.set('n', 's', api.node.open.vertical, opts('vsplit')) + vim.keymap.set('n', 'i', api.node.open.horizontal, opts('hsplit')) + vim.keymap.set('n', '', api.tree.close, opts('close')) + vim.keymap.set('n', 'CC', api.tree.change_root_to_node, opts('change root')) + vim.keymap.set('n', 'u', api.tree.change_root_to_parent, opts('up')) +end + +-- nvim-tree +require('nvim-tree').setup({ + view = { + width = 31, + }, + on_attach = nvim_tree_attach, + filters = { + dotfiles = true, + }, + diagnostics = { + enable = true, + show_on_dirs = true, + }, + git = { + enable = false, + }, +}) + +-- Spellcheck +vim.o.spelllang = 'en_us,de_de' + +-- Lualine +require('lualine').setup({ + options = { + theme = 'solarized_dark', + component_separators = { left = '', right = '|' }, + section_separators = { left = '', right = '' }, + }, + sections = { + lualine_c = { { 'filename', path = 1 } } + }, +}) + +-- Usability +vim.o.splitbelow = true +vim.o.splitright = true + +vim.o.foldmethod = "marker" + +vim.o.hidden = true + +vim.o.ignorecase = true +vim.o.smartcase = true + +vim.o.cmdheight = 2 + +vim.o.updatetime = 300 + +vim.o.mouse = '' + +-- Whitespace +vim.o.expandtab = true +vim.o.shiftwidth = 4 +vim.o.tabstop = 4 +vim.o.list = true +vim.o.listchars = 'tab:»·,trail:·' + +local augroup = vim.api.nvim_create_augroup("initEx", { clear = true }) +vim.api.nvim_create_autocmd('BufWritePre', { + pattern = '*', + callback = function() + local cursor = vim.fn.getpos('.') + vim.cmd([[s/\s\+$//ge]]) + vim.fn.setpos('.', cursor) + end, + group = augroup, +}) +vim.cmd([[ +autocmd BufReadPost * if &ft != 'gitcommit' && line("'\"") > 0 && line("'\"") <= line("$") | exe "normal! g'\"" | endif +]]) +vim.api.nvim_create_autocmd('BufWritePre', { + pattern = '*', + callback = function() + vim.lsp.buf.format({ async = false }) + end, + group = augroup, +}) + +-- vim-tmux-navigator +vim.g.tmux_navigator_save_on_switch = 1 diff --git a/plugins.vim b/plugins.vim deleted file mode 100644 index cbd805c..0000000 --- a/plugins.vim +++ /dev/null @@ -1,38 +0,0 @@ -" Install vim-plug if we don't already have it -if has('nvim') - if empty(glob('~/.local/share/nvim/site/autoload/plug.vim')) - execute '!curl -fLo $HOME/.local/share/nvim/site/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim' - autocmd VimEnter * PlugInstall --sync | source $MYVIMRC - endif -else - if empty(glob('~/.vim/autoload/plug.vim')) - execute '!curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim' - autocmd VimEnter * PlugInstall --sync | source $MYVIMRC - endif -endif - -if has('nvim') - call plug#begin(stdpath('data') . "/plugged") -else - call plug#begin("~/.vim/plugged") -endif - -Plug 'christoomey/vim-tmux-navigator' - -Plug 'preservim/nerdtree' - -Plug 'tpope/vim-surround' -Plug 'jiangmiao/auto-pairs' -Plug 'tomtom/tcomment_vim' - -Plug 'junegunn/fzf', { 'do': { -> fzf#install() } } -Plug 'junegunn/fzf.vim' - -Plug 'neoclide/coc.nvim', { 'branch': 'release' } -Plug 'rust-lang/rust.vim' -Plug 'github/copilot.vim' - -Plug 'mattn/webapi-vim' -Plug 'airblade/vim-gitgutter' - -call plug#end() diff --git a/tmux.conf b/tmux.conf index cdc723a..70c2b9d 100644 --- a/tmux.conf +++ b/tmux.conf @@ -54,7 +54,8 @@ set-option -g visual-silence off set-window-option -g monitor-activity off set-option -g bell-action none -set -g default-terminal "screen-256color" +set -g default-terminal "tmux-256color" +set -sg terminal-overrides ",*:RGB" # The modes { setw -g clock-mode-colour colour12