Remove old neovim config

This commit is contained in:
2021-11-12 19:24:39 +03:00
parent 655d753cf7
commit ea75e570fe
11 changed files with 0 additions and 321 deletions

View File

@@ -1,35 +0,0 @@
{
"coc.preferences.formatOnSaveFiletypes": [
"css",
"markdown",
"javascript",
"typescript",
"svelte",
"javascriptreact",
"typescriptreact",
"json",
"jsonc",
"rust"
],
"python.jediEnabled": false,
"coc.source.emoji.filetypes": [
"markdown",
"javascript",
"typescript",
"javascriptreact",
"typescriptreact",
"python",
"go",
"svelte"
],
"svelte.plugin.svelte.completions.enable": true,
"svelte.plugin.css.completions.enable": true,
"svelte.plugin.svelte.enable": true,
"svelte.plugin.html.enable": true,
"svelte.plugin.css.enable": true,
"svelte.enable-ts-plugin": true,
"svelte.plugin.svelte.format.enable": true,
"html.filetypes": ["html", "javascriptreact", "typescriptreact"],
"rust.all_features": true,
"rust-client.updateOnStartup": true
}

View File

@@ -1,72 +0,0 @@
" Always show the signcolumn, otherwise it would shift the text each time
" diagnostics appear/become resolved.
if has("nvim-0.5.0") || has("patch-8.1.1564")
" Recently vim can merge signcolumn and number column into one
set signcolumn=number
else
set signcolumn=yes
endif
" Use tab for trigger completion with characters ahead and navigate.
inoremap <silent><expr> <TAB>
\ pumvisible() ? "\<C-n>" :
\ <SID>check_back_space() ? "\<TAB>" :
\ coc#refresh()
inoremap <expr><S-TAB> pumvisible() ? "\<C-p>" : "\<C-h>"
function! s:check_back_space() abort
let col = col('.') - 1
return !col || getline('.')[col - 1] =~# '\s'
endfunction
" Use <c-space> to trigger completion.
if has('nvim')
inoremap <silent><expr> <c-space> coc#refresh()
else
inoremap <silent><expr> <c-@> coc#refresh()
endif
" GoTo definition
nmap <silent> gd <Plug>(coc-definition)
" Use <C-l> for trigger snippet expand.
imap <C-l> <Plug>(coc-snippets-expand)
" Use F2 to rename a variable, e.g.
nmap <F2> <Plug>(coc-rename)
let g:coc_global_extensions = [
\ 'coc-tsserver',
\ 'coc-css',
\ 'coc-go',
\ 'coc-html',
\ 'coc-prettier',
\ 'coc-sh',
\ 'coc-svelte',
\ 'coc-pairs',
\ 'coc-json',
\ 'coc-snippets',
\ 'coc-emmet',
\ 'coc-highlight',
\ 'coc-python',
\ 'coc-emoji',
\ 'coc-toml',
\ 'coc-rls'
\ ]
" Use <cr> to confirm completion, `<C-g>u` means break undo chain at current position.
" Coc only does snippet and additional edit on confirm.
inoremap <expr> <cr> pumvisible() ? "\<C-y>" : "\<C-g>u\<CR>"
command! -nargs=0 Prettier :CocCommand prettier.formatFile
" Use K to show documentation in preview window
nnoremap <silent> K :call <SID>show_documentation()<CR>
function! s:show_documentation()
if (index(['vim','help'], &filetype) >= 0)
execute 'h '.expand('<cword>')
else
call CocAction('doHover')
endif
endfunction

View File

@@ -1,32 +0,0 @@
lua << EOF
require("nvim-tree").setup({
open_on_setup = true,
hijack_cursor = true,
indent_markers = true,
update_cwd = true,
update_focused_file = {
enable = true
},
view = {
width = 30,
side = "left",
auto_resize = true
},
filters = {
custom = {".git"}
}
})
EOF
let g:nvim_tree_add_trailing = 1
let g:nvim_tree_indent_markers = 1
let g:nvim_tree_show_icons = {
\ 'git': 0,
\ 'folders': 0,
\ 'files': 0,
\ 'folder_arrows': 0,
\ }
" Remaps
nnoremap <leader>b :NvimTreeToggle<CR>
nnoremap <leader>r :NvimTreeRefresh<CR>

View File

@@ -1,26 +0,0 @@
syntax on
set tabstop=2
set shiftwidth=2
set expandtab
set number
set relativenumber
set wrap
set noswapfile
set encoding=utf-8
set hidden
set nowritebackup
set cmdheight=2
set updatetime=300
set shortmess+=c
set mouse=a " nv for normal and visual only
set cursorline
set clipboard+=unnamedplus
set splitright
set splitbelow
set termguicolors
" MY LEADER KEY IS GONNA BE A SPACE
let mapleader = " "

View File

@@ -1,21 +0,0 @@
lua << EOF
require("gitsigns").setup {
signcolumn = false,
current_line_blame = true,
current_line_blame_opts = {
virt_text = true,
virt_text_pos = 'eol', -- 'eol' | 'overlay' | 'right_align'
delay = 500,
}
}
EOF
" Remap to toggle gitsigns as linehl
nnoremap <leader>sg :Gitsigns toggle_linehl<CR>
" Open Gitabra
nnoremap <leader>gg :G<CR>
nnoremap <leader>gs :Gitsigns stage_hunk<CR>
nnoremap <leader>gu :Gitsigns undo_stage_hunk<CR>
nnoremap <leader>gc :!git commit<CR>

View File

@@ -1,37 +0,0 @@
source $HOME/.config/nvim/plugins.vim
source $HOME/.config/nvim/general.vim
source $HOME/.config/nvim/remaps.vim
source $HOME/.config/nvim/theme.vim
source $HOME/.config/nvim/file-tree.vim
source $HOME/.config/nvim/coc.vim
source $HOME/.config/nvim/tabs.vim
source $HOME/.config/nvim/git.vim
" Filetypes for markdown extension
let g:mkdp_filetypes = ['md', 'mdx', 'markdown']
let g:svelte_preprocessors = ['typescript', 'scss']
let g:closetag_filenames = '*.html,*.svelte,*.jsx,*.tsx'
let g:closetag_regions = {
\ 'typescript.tsx': 'jsxRegion,tsxRegion',
\ 'javascript.jsx': 'jsxRegion',
\ 'typescriptreact': 'jsxRegion,tsxRegion',
\ 'javascriptreact': 'jsxRegion',
\ }
lua <<EOF
require("telescope").setup({
defaults = {
sorting_strategy = "ascending"
}
})
require("nvim-treesitter.configs").setup({
highlight = {
enable = true
},
indent = {
enable = true
}
})
EOF

View File

@@ -1,23 +0,0 @@
call plug#begin('~/.config/nvim/plugged')
Plug 'ayu-theme/ayu-vim'
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
Plug 'tpope/vim-commentary'
Plug 'neoclide/coc.nvim', { 'do': 'yarn install --frozen-lockfile' }
Plug 'kyazdani42/nvim-tree.lua'
Plug 'iamcco/markdown-preview.nvim', { 'do': 'cd app && yarn install' }
Plug 'akinsho/bufferline.nvim'
Plug 'alvan/vim-closetag'
Plug 'kyazdani42/nvim-web-devicons'
Plug 'fatih/vim-go'
Plug 'tpope/vim-fugitive'
Plug 'lukas-reineke/indent-blankline.nvim'
Plug 'lewis6991/gitsigns.nvim'
Plug 'nvim-lua/plenary.nvim'
Plug 'caenrique/nvim-toggle-terminal'
Plug 'nvim-telescope/telescope.nvim'
Plug 'nvim-treesitter/nvim-treesitter', { 'do': ':TSUpdate' }
call plug#end()

View File

@@ -1,47 +0,0 @@
" These allow me to quickly save and quit vim
nnoremap <leader>w :w<CR>
nnoremap <leader>q :q<CR>
" Remaps to move line under the cursor up and down
nnoremap <C-k> :m .-2<CR>==
nnoremap <C-j> :m .+1<CR>==
vnoremap K :m '<-2<CR>gv=gv
vnoremap J :m '>+1<CR>gv=gv
" Move split panes to left/bottom/top/right
nnoremap <A-h> <C-W>H
nnoremap <A-j> <C-W>J
nnoremap <A-k> <C-W>K
nnoremap <A-l> <C-W>L
" move between panes to left/bottom/top/right
nnoremap <leader>h <C-w>h
nnoremap <leader>j <C-w>j
nnoremap <leader>k <C-w>k
nnoremap <leader>l <C-w>l
tnoremap <A-h> <C-\><C-n><C-w>h
tnoremap <A-j> <C-\><C-n><C-w>j
tnoremap <A-k> <C-\><C-n><C-w>k
tnoremap <A-l> <C-\><C-n><C-w>l
" Remove search highlighting
noremap <leader>nh :nohl<CR>
" Open terminal
nnoremap <leader>t :ToggleTerminal<CR>
" Use Escape to go to normal mode
tnoremap <Esc> <C-\><C-n>
" Open splits
nnoremap <leader>sv :vs<CR>
nnoremap <leader>sh :sp<CR>
" Use Ctrl+Shift+hjkl to resize panes
nnoremap <C-j> :resize -2<CR>
nnoremap <C-k> :resize +2<CR>
nnoremap <C-h> :vert resize -10<CR>
nnoremap <C-l> :vert resize +10<CR>
" Telescope
nnoremap <leader>f :Telescope find_files<CR>

View File

@@ -1,19 +0,0 @@
lua << EOF
require("bufferline").setup{}
EOF
nnoremap <silent><C-[> :BufferLineCyclePrev<CR>
nnoremap <silent><C-]> :BufferLineCycleNext<CR>
nnoremap <silent><leader>1 <Cmd>BufferLineGoToBuffer 1<CR>
nnoremap <silent><leader>2 <Cmd>BufferLineGoToBuffer 2<CR>
nnoremap <silent><leader>3 <Cmd>BufferLineGoToBuffer 3<CR>
nnoremap <silent><leader>4 <Cmd>BufferLineGoToBuffer 4<CR>
nnoremap <silent><leader>5 <Cmd>BufferLineGoToBuffer 5<CR>
nnoremap <silent><leader>6 <Cmd>BufferLineGoToBuffer 6<CR>
nnoremap <silent><leader>7 <Cmd>BufferLineGoToBuffer 7<CR>
nnoremap <silent><leader>8 <Cmd>BufferLineGoToBuffer 8<CR>
nnoremap <silent><leader>9 <Cmd>BufferLineGoToBuffer 9<CR>
" Close tab
nnoremap <leader>e :bd<CR>

View File

@@ -1,2 +0,0 @@
" Use Escape to go to normal mode
tnoremap <Esc> <C-\><C-n>

View File

@@ -1,7 +0,0 @@
" Colorscheme
let ayucolor = 'mirage'
colorscheme ayu
" Airline
let g:airline#extensions#tabline#enabled = 1
let g:airline_theme = 'ayu_mirage'