Aktualizovat init.vim

This commit is contained in:
Kankys 2024-10-14 06:49:09 +00:00
parent 574cfddb95
commit 94cddad983

116
init.vim
View File

@ -1,48 +1,59 @@
set number
set noshowmode
set signcolumn=number
call plug#begin(has('nvim') ? stdpath('data') . '/plugged' : '~/.vim/plugged')
"Prettier + setup
" post install (yarn install | npm install) then load plugin only for editing supported files
Plug 'prettier/vim-prettier', {
\ 'do': 'yarn install --frozen-lockfile --production',
\ 'for': ['javascript', 'typescript', 'css', 'less', 'scss', 'json', 'graphql', 'markdown', 'vue', 'svelte', 'yaml', 'html'] }
" Přidání klávesové zkratky pro potvrzení nápovědy kódu
imap <silent><expr> <TAB> coc#pum#visible() ? coc#pum#confirm() : "\<TAB>"
Plug 'othree/html5.vim'
Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}
" AutocloseTag
Plug 'm4xshen/autoclose.nvim'
Plug 'shellRaining/hlchunk.nvim' " Propojovací line (lua)
" NERDTree postraní panel
Plug 'https://github.com/scrooloose/nerdtree'
Plug 'Exafunction/codeium.vim', { 'branch': 'main' } " Free AI codium
"Coc
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'm4xshen/autoclose.nvim' " AutocloseTag (lua)
" Tabnine
Plug 'codota/tabnine-nvim', { 'do': './dl_binaries.sh' }
Plug 'https://github.com/scrooloose/nerdtree' " NERDTree postraní panel
" Alternativní startovací obrazovka
Plug 'mhinz/vim-startify'
Plug 'neoclide/coc.nvim', {'branch': 'release'} "Coc balíčkovací systém
" NERD Commenter
Plug 'preservim/nerdcommenter'
Plug 'mhinz/vim-startify' " Alternativní startovací obrazovka
" Wakatime
Plug 'wakatime/vim-wakatime'
Plug 'preservim/nerdcommenter' " NERD Commenter - komentáře
" Search plugin s asynchroním vyhledáváním
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
Plug 'junegunn/fzf.vim'
Plug 'wakatime/vim-wakatime' " Wakatime
"Spodní lišta
Plug 'itchyny/lightline.vim'
Plug 'tpope/vim-fugitive' " Git - vim fugitive
" Autosave
Plug 'Pocco81/auto-save.nvim'
Plug 'lewis6991/gitsigns.nvim' " Git Signs (lua) - prohlížení smazaných řádku
" Telescope (lua)
" Telescope requires plenary to function
" Plug 'nvim-lua/plenary.nvim'
" The main Telescope plugin
" Plug 'nvim-telescope/telescope.nvim'
" An optional plugin recommended by Telescope docs
" Plug 'nvim-telescope/telescope-fzf-native.nvim', {'do': 'make' }
" Plug 'ryanoasis/vim-devicons' " Icons
Plug 'lilydjwg/colorizer' " Náhled barev css
Plug 'Pocco81/auto-save.nvim' " Autosave
" Theme
Plug 'dracula/vim', { 'as': 'dracula' }
Plugin 'NLKNguyen/papercolor-theme'
Plug 'Tsuzat/NeoSolarized.nvim', { 'branch': 'master' }
Plug 'bluz71/vim-moonfly-colors', { 'as': 'moonfly' }
@ -75,55 +86,56 @@ Plug 'nordtheme/vim'
call plug#end()
" Nastavení klávesy Enter pro potvrzení výběru z vyskakovací nápovědy
" inoremap <expr> <CR> pumvisible() ? "\<C-y>" : "\<CR>"
" Nastavení klávesy Enter pro potvrzení výběru z vyskakovací nápovědy - nejde
" s autoclose!
inoremap <expr> <CR> pumvisible() ? "\<C-y>" : "\<CR>"
" Autostart NERDTreeFocus
autocmd VimEnter * call NERDTreeFocus()
" Autostart NERDTree
" autocmd VimEnter * call NERDTreeFocus() " Autostart NERDTreeFocus
" Komentáře NERD Commenter klávesové zkratky
" Komentáře NERD Commenter klávesové zkratky Ctrl + k + l
let mapleader=","
nmap <C-k> <plug>NERDCommenterToggle
vmap <C-l> <plug>NERDCommenterToggle<CR>
" Atomaticky po startu theme
colorscheme dracula
autocmd VimEnter * colorscheme dracula
colorscheme nightfly
autocmd VimEnter * colorscheme nightfly
" Autosave
let g:auto_save_enabled = 1
let g:auto_save_delay = 3000
let g:auto_save_events = ['InsertLeave', 'TextChanged']
" Nastavení Prettieru
command! -nargs=0 Prettier :CocCommand prettier.forceFormatDocument
let g:prettier#autoformat = 1
let g:prettier#autoformat_require_pragma = 1
let g:prettier#autoformat_config_files = ['prettier.config.js', '.prettierrc', '.prettierrc.json', '.prettierrc.yml', '.prettierrc.yaml', '.prettierrc.json5', '.prettierrc.js', '.prettierrc.cjs', '.prettierrc.toml', '.prettierrc.jsonc', '.prettierrc.html']
" keys pretier
vmap <leader>f <Plug>(coc-format-selected)
nmap <leader>f <Plug>(coc-format-selected)
lua <<EOF
--Tabnine setup ( Tabnine PRO)
require('tabnine').setup({
disable_auto_comment=true,
accept_keymap="<Tab>",
dismiss_keymap = "<C-]>",
debounce_ms = 800,
suggestion_color = {gui = "#808080", cterm = 244},
exclude_filetypes = {"TelescopePrompt", "NvimTree"},
log_file_path = nil, -- absolute path to Tabnine log file
})
--AutocloseTag setup
require("autoclose").setup()
--Line
require('hlchunk').setup({
indent = {
chars = {
"│",
},
style = {
"#FF0000",
"#FF7F00",
"#FFFF00",
"#00FF00",
"#00FFFF",
"#0000FF",
"#8B00FF",
},
}
})
EOF