require("telescope") require("lsp") vim.cmd([[ filetype plugin indent on " allow auto-indenting depending on file type filetype plugin on syntax on " syntax highlighting set autoindent " indent a new line the same amount as the line just typed set autochdir set wrap set encoding=UTF-8 set cmdheight=1 " Give more space for displaying messages. set colorcolumn=80 set cursorline " highlight current cursorline set expandtab set guicursor= set hidden set hlsearch " highlight search set ignorecase " case insensitive set incsearch set incsearch " incremental search set isfname+=@-@ set mouse=a " enable mouse click set mouse=v " middle-click paste with set nobackup set nocompatible " disable compatibility to old-time vi set noerrorbells set noswapfile set nowrap set nu set scrolloff=8 set shiftwidth=4 set shortmess+=c " Don't pass messages to |ins-completion-menu|. set showmatch " show matching set signcolumn=yes set smartindent set tabstop=4 set softtabstop=4 set termguicolors set ttyfast " Speed up scrolling in Vim set undodir=~/.vim/undodir set undofile set updatetime=50 set wildmode=longest,list " get bash-like tab completions set grepprg=rg\ --vimgrep\ --smart-case\ --follow " Colors set termguicolors set background=dark colorscheme catppuccin-mocha " Navigation let mapleader = " " nnoremap j nnoremap k nnoremap h nnoremap l " Quicker quits nnoremap q " Open new split panes to right and bottom, which feels more natural set splitbelow set splitright " Quick directory change nnoremap cd :cd %:p:h:pwd nnoremap wq :w:bd " Run commands that require an interactive shell nnoremap r :terminal " Switch between the last two files nnoremap " Git nnoremap git :Git " Telescope nnoremap fs :lua require('telescope.builtin').grep_string({ search = vim.fn.input("Grep For > ")}) nnoremap :lua require('telescope.builtin').git_files() nnoremap ff :lua require('telescope.builtin').find_files() nnoremap fb :Telescope file_browser nnoremap fb :Telescope file_browser noremap fp :Telescope project nnoremap fw :lua require('telescope.builtin').grep_string { search = vim.fn.expand("") } nnoremap bf :lua require('telescope.builtin').buffers() nnoremap nix :lua require('telescope').search_nixos_config() nnoremap src :lua require('telescope').search_src() " Undotree nnoremap pu :UndotreeToggle ]])