a new fresh vimscript config

This commit is contained in:
2024-03-06 22:45:10 +01:00
parent b0028f2f28
commit f0ebf0054d
2 changed files with 79 additions and 2 deletions

View File

@@ -1,8 +1,21 @@
# dotfiles # dotfiles
My attempt to make my personal dotfiles (I'm doing this to learn more about Linux and the Vim's world!) My attempt to make my personal dotfiles (I'm doing this to learn more about Linux and the Vim's world!)
## My setup ## My setup
- Neovim - Neovim
Install your preferred LSP (`coc-rust-analyzer`, `coc-pyright`, and so on...) ### Startup
First of all install jedi by typing:
```bash
pip install jedi-language-server
```
After cloned the repo, move the `init.vim` in the neovim config, start neovim and type: `:PlugInstall`. This should do all the stuff needed.
### Other
Install your preferred LSP (`coc-rust-analyzer`, `coc-python`, and so on...)
## Keybindings
- CTRL + ww -> change window's focus
- CTRL + y -> accept autocomplete suggestion
- m (with nerdtree focused) -> opens the nerdtree's menu

64
init.vim Normal file
View File

@@ -0,0 +1,64 @@
let mapleader = "\<Space>"
set encoding=utf-8
set termguicolors
set noswapfile
set undofile
set clipboard=unnamedplus
set mouse=a
set autoindent
set expandtab
set shiftwidth=2
set softtabstop=2
set number
set relativenumber
set cursorline
set showmatch
set matchpairs+=<:>
set matchtime=5
set hlsearch
set incsearch
set ignorecase
set smartcase
call plug#begin('~/.config/nvim/plugged')
Plug 'tpope/vim-fugitive' " Git integration
Plug 'tpope/vim-commentary' " Commenting
Plug 'tpope/vim-surround' " Manipulating surroundings
Plug 'preservim/nerdtree' " File explorer
Plug 'itchyny/lightline.vim' " Statusline
Plug 'neoclide/coc.nvim', {'branch': 'release'} " Language server protocol support
Plug 'SirVer/ultisnips' " Snippet engine
Plug 'honza/vim-snippets' " Snippets library
Plug 'davidhalter/jedi-vim' " Python autocompletion
Plug 'vim-scripts/c.vim' " C syntax and indentation
Plug 'rust-lang/rust.vim' " Rust syntax and indentation
Plug 'folke/tokyonight.nvim'
call plug#end()
colorscheme tokyonight-night
let g:coc_global_extensions = [
\ 'coc-snippets',
\ 'coc-jedi',
\ 'coc-clangd',
\ 'coc-rls',
\]
"let g:jedi#completions_enabled = 1
if has('nvim')
set updatetime=300
set winwidth=84
set backupdir=~/.config/nvim/backup//
set directory=~/.config/nvim/swap//
endif
autocmd VimEnter * NERDTree