" enter normal mode from terminal-emulator with inoremap tnoremap " automatically enter insert mode on new neovim terminals augroup terminal au TermOpen * startinsert augroup END " debuging packadd termdebug " debugging for rust command Rustdebug :let termdebugger="rust-gdb" | :Termdebug " Set completeopt to have a better completion experience" set completeopt=menuone,noinsert,noselect " Set completeopt to have a better completion experience" set completeopt=menuone,noinsert,noselect " load vim plugged stuff runtime plugs.vim " load plugins from extra files runtime nvim-tree.vim " plugin specific configs runtime markdownpreview.vim " load plugins from extra files runtime nvim-table-mode.vim " load tabbar runtime tagbar.vim " load suda runtime suda.vim " load ALE (another language server or something that works with COC) "runtime ale.vim " no default mappings for vim smoothie (fancy scrolling) let g:smoothie_no_default_mappings = 1 " smooth scrolling with J and K instead of and nnoremap J call smoothie#do("\") vnoremap J call smoothie#do("\") nnoremap K call smoothie#do("\") vnoremap K call smoothie#do("\") " Use and to navigate through popup menu" inoremap pumvisible() ? "\" : "\" inoremap pumvisible() ? "\" : "\" " Set completeopt to have a better completion experience" set completeopt=menuone,noinsert,noselect " Move to previous/next" nnoremap BufferPrevious nnoremap BufferNext " Re-order to previous/next" nnoremap BufferMovePrevious nnoremap > BufferMoveNext " Goto buffer in position..." nnoremap BufferGoto 1 nnoremap BufferGoto 2 nnoremap BufferGoto 3 nnoremap BufferGoto 4 nnoremap BufferGoto 5 nnoremap BufferGoto 6 nnoremap BufferGoto 7 nnoremap BufferGoto 8 nnoremap BufferGoto 9 nnoremap BufferLast " Pin/unpin buffer" nnoremap BufferPin " Close buffer" nnoremap BufferClose " Wipeout buffer " :BufferWipeout " Close commands " :BufferCloseAllButCurrent " :BufferCloseAllButVisible " :BufferCloseAllButPinned " :BufferCloseAllButCurrentOrPinned " :BufferCloseBuffersLeft " :BufferCloseBuffersRight " Magic buffer-picking mode nnoremap BufferPick " Sort automatically by..." nnoremap bb BufferOrderByBufferNumber nnoremap bd BufferOrderByDirectory nnoremap bl BufferOrderByLanguage nnoremap bw BufferOrderByWindowNumber " Other: " :BarbarEnable - enables barbar (enabled by default) " :BarbarDisable - very bad command, should never be used " color nightfox let g:lazygit_floating_window_winblend = 0 " transparency of floating window let g:lazygit_floating_window_scaling_factor = 0.9 " scaling factor for floating window let g:lazygit_floating_window_border_chars = ['╭', '╮', '╰', '╯'] " customize lazygit popup window corner characters let g:lazygit_floating_window_use_plenary = 0 " use plenary.nvim to manage floating window if available let g:lazygit_use_neovim_remote = 1 " fallback to 0 if neovim-remote is not installed let g:lazygit_use_custom_config_file_path = 0 " config file path is evaluated if this value is 1 let g:lazygit_config_file_path = '' " custom config file path " setup mapping to call :LazyGit nnoremap gg :LazyGit " coc language server configs runtime coc.vim " do these commands manually, they dont like being scripted. "CocInstall coc-clangd coc-cmake coc-css coc-floaterm coc-fzf-preview coc-git coc-html coc-json "CocInstall coc-lists coc-lua coc-pyright coc-rust-analyzer coc-sh coc-snippets coc-sql """"these may cause errors"""""CocInstall coc-symbol-line coc-toml coc-texlab coc-vimlsp coc-xml " slime (sends stuff to other programs, like ipython) let g:slime_target = "neovim" "------------------------------------------------------ lua << EOF -- disable netrw at the very start of your init.lua (strongly advised) vim.g.loaded_netrw = 1 vim.g.loaded_netrwPlugin = 1 -- set termguicolors to enable highlight groups vim.opt.termguicolors = true require('lualine').setup { options = { icons_enabled = true, theme = 'auto', component_separators = { left = '', right = ''}, section_separators = { left = '', right = ''}, disabled_filetypes = { statusline = {}, winbar = {}, }, ignore_focus = {}, always_divide_middle = true, globalstatus = false, refresh = { statusline = 1000, tabline = 1000, winbar = 1000, } }, sections = { lualine_a = {'mode'}, lualine_b = {'branch', 'diff', 'diagnostics'}, lualine_c = {'filename'}, lualine_d = {'diagnostics'}, lualine_x = {'encoding', 'fileformat', 'filetype', 'filesize'}, lualine_y = {'progress'}, lualine_z = {'location'} }, inactive_sections = { lualine_a = {}, lualine_b = {}, lualine_c = {'filename'}, lualine_x = {'location'}, lualine_y = {}, lualine_z = {} }, tabline = {}, winbar = {}, inactive_winbar = {}, extensions = {} } require'FTerm'.setup({ border = 'single', dimensions = { height = 0.9, width = 0.9, }, }) -- floaterm keys vim.keymap.set('n', '', 'lua require("FTerm").toggle()') vim.keymap.set('t', '', 'lua require("FTerm").toggle()') -- slime -- get id of a terminal, FloatTerm is usually 7, but I should rice this more vim.g.slime_get_jobid = function() return 7 end EOF