2024-10-18 07:02:55 +00:00
|
|
|
set number " zobrazí čísla řádků
|
|
|
|
set wrap " zalomí kód na řádku
|
|
|
|
set cursorline " zvýraznění řádku s kurzorem
|
2024-10-14 06:49:09 +00:00
|
|
|
set noshowmode
|
2024-10-18 07:02:55 +00:00
|
|
|
set title " zobrazí název a cestu souboru
|
|
|
|
set clipboard=unnamedplus " povolí kopírování a vkládání mimo Neovim
|
2024-10-14 06:49:09 +00:00
|
|
|
set signcolumn=number
|
2024-03-16 21:09:58 +00:00
|
|
|
|
2024-03-09 18:56:44 +00:00
|
|
|
call plug#begin(has('nvim') ? stdpath('data') . '/plugged' : '~/.vim/plugged')
|
|
|
|
|
2024-10-14 06:49:09 +00:00
|
|
|
"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',
|
2024-10-15 18:06:54 +00:00
|
|
|
\ 'for': ['javascript', 'typescript', 'css', 'less', 'scss', 'json', 'graphql', 'markdown', 'vue', 'svelte', 'yaml', 'html', 'php'] }
|
2024-10-14 06:49:09 +00:00
|
|
|
|
|
|
|
" Přidání klávesové zkratky pro potvrzení nápovědy kódu
|
|
|
|
imap <silent><expr> <TAB> coc#pum#visible() ? coc#pum#confirm() : "\<TAB>"
|
|
|
|
|
2024-03-16 21:09:58 +00:00
|
|
|
Plug 'othree/html5.vim'
|
2024-03-09 18:56:44 +00:00
|
|
|
|
2024-10-18 07:55:21 +00:00
|
|
|
Plug 'shellRaining/hlchunk.nvim' " Propojovací lajny v kódu (lua)
|
2024-03-24 16:29:35 +00:00
|
|
|
|
2024-10-14 15:59:35 +00:00
|
|
|
" Plug 'Exafunction/codeium.vim', { 'branch': 'main' } " Free AI codium
|
2024-03-18 07:58:01 +00:00
|
|
|
|
2024-10-14 06:49:09 +00:00
|
|
|
Plug 'm4xshen/autoclose.nvim' " AutocloseTag (lua)
|
2024-03-09 18:56:44 +00:00
|
|
|
|
2024-10-14 06:49:09 +00:00
|
|
|
Plug 'https://github.com/scrooloose/nerdtree' " NERDTree postraní panel
|
2024-03-09 18:56:44 +00:00
|
|
|
|
2024-10-14 06:49:09 +00:00
|
|
|
Plug 'neoclide/coc.nvim', {'branch': 'release'} "Coc balíčkovací systém
|
2024-03-09 18:56:44 +00:00
|
|
|
|
2024-10-14 06:49:09 +00:00
|
|
|
Plug 'mhinz/vim-startify' " Alternativní startovací obrazovka
|
2024-03-09 18:56:44 +00:00
|
|
|
|
2024-10-14 06:49:09 +00:00
|
|
|
Plug 'preservim/nerdcommenter' " NERD Commenter - komentáře
|
2024-03-09 18:56:44 +00:00
|
|
|
|
2024-10-14 06:49:09 +00:00
|
|
|
Plug 'wakatime/vim-wakatime' " Wakatime
|
2024-03-09 18:56:44 +00:00
|
|
|
|
2024-10-14 06:49:09 +00:00
|
|
|
Plug 'tpope/vim-fugitive' " Git - vim fugitive
|
2024-03-09 18:56:44 +00:00
|
|
|
|
2024-10-14 06:49:09 +00:00
|
|
|
Plug 'lilydjwg/colorizer' " Náhled barev css
|
|
|
|
|
|
|
|
Plug 'Pocco81/auto-save.nvim' " Autosave
|
2024-03-09 18:56:44 +00:00
|
|
|
|
2024-10-16 15:27:40 +00:00
|
|
|
Plug 'pangloss/vim-javascript'
|
2024-10-15 18:06:54 +00:00
|
|
|
|
|
|
|
|
2024-03-09 18:56:44 +00:00
|
|
|
" Theme
|
2024-03-25 19:37:23 +00:00
|
|
|
Plug 'dracula/vim', { 'as': 'dracula' }
|
2024-03-21 16:08:45 +00:00
|
|
|
|
|
|
|
Plug 'Tsuzat/NeoSolarized.nvim', { 'branch': 'master' }
|
|
|
|
|
|
|
|
Plug 'bluz71/vim-moonfly-colors', { 'as': 'moonfly' }
|
|
|
|
|
|
|
|
Plug 'ghifarit53/tokyonight-vim'
|
2024-03-09 18:56:44 +00:00
|
|
|
|
2024-03-09 20:26:29 +00:00
|
|
|
Plug 'morhetz/gruvbox'
|
|
|
|
|
|
|
|
Plug 'joshdick/onedark.vim'
|
|
|
|
|
|
|
|
Plug 'sainnhe/sonokai'
|
|
|
|
|
|
|
|
Plug 'sainnhe/edge'
|
|
|
|
|
|
|
|
Plug 'vim-airline/vim-airline'
|
|
|
|
|
|
|
|
Plug 'projekt0n/github-nvim-theme'
|
|
|
|
|
|
|
|
Plug 'bluz71/vim-nightfly-colors', { 'as': 'nightfly' }
|
|
|
|
|
|
|
|
Plug 'xero/miasma.nvim'
|
2024-03-09 18:56:44 +00:00
|
|
|
|
2024-03-16 21:09:58 +00:00
|
|
|
Plug 'sts10/vim-pink-moon'
|
2024-03-09 18:56:44 +00:00
|
|
|
|
2024-03-16 21:09:58 +00:00
|
|
|
Plug 'gilgigilgil/anderson.vim'
|
2024-03-09 20:26:29 +00:00
|
|
|
|
2024-03-16 21:09:58 +00:00
|
|
|
Plug 'jacoborus/tender.vim'
|
2024-03-09 18:56:44 +00:00
|
|
|
|
2024-03-16 21:09:58 +00:00
|
|
|
Plug 'nordtheme/vim'
|
2024-03-09 18:56:44 +00:00
|
|
|
|
2024-10-15 18:06:54 +00:00
|
|
|
" CMP setup
|
|
|
|
|
|
|
|
" LSP
|
|
|
|
Plug 'neovim/nvim-lspconfig'
|
|
|
|
|
|
|
|
" Autocompletion
|
|
|
|
Plug 'hrsh7th/nvim-cmp'
|
|
|
|
Plug 'hrsh7th/cmp-nvim-lsp'
|
|
|
|
Plug 'hrsh7th/cmp-buffer'
|
|
|
|
Plug 'hrsh7th/cmp-path'
|
|
|
|
Plug 'hrsh7th/cmp-cmdline'
|
|
|
|
Plug 'hrsh7th/cmp-vsnip'
|
|
|
|
Plug 'hrsh7th/vim-vsnip'
|
|
|
|
|
|
|
|
" LSP Signature
|
|
|
|
Plug 'ray-x/lsp_signature.nvim'
|
|
|
|
|
|
|
|
" Lightbulb
|
|
|
|
Plug 'kosayoda/nvim-lightbulb'
|
|
|
|
|
2024-03-09 18:56:44 +00:00
|
|
|
call plug#end()
|
|
|
|
|
2024-10-14 15:59:35 +00:00
|
|
|
|
2024-10-14 06:49:09 +00:00
|
|
|
" Autostart NERDTree
|
|
|
|
" autocmd VimEnter * call NERDTreeFocus() " Autostart NERDTreeFocus
|
2024-03-09 18:56:44 +00:00
|
|
|
|
2024-10-14 06:49:09 +00:00
|
|
|
" Komentáře NERD Commenter klávesové zkratky Ctrl + k + l
|
2024-03-09 18:56:44 +00:00
|
|
|
let mapleader=","
|
|
|
|
nmap <C-k> <plug>NERDCommenterToggle
|
|
|
|
vmap <C-l> <plug>NERDCommenterToggle<CR>
|
|
|
|
|
|
|
|
" Atomaticky po startu theme
|
2024-10-15 18:06:54 +00:00
|
|
|
colorscheme dracula
|
|
|
|
autocmd VimEnter * colorscheme dracula
|
2024-03-09 18:56:44 +00:00
|
|
|
|
|
|
|
" Autosave
|
|
|
|
let g:auto_save_enabled = 1
|
|
|
|
let g:auto_save_delay = 3000
|
|
|
|
let g:auto_save_events = ['InsertLeave', 'TextChanged']
|
|
|
|
|
2024-10-14 06:49:09 +00:00
|
|
|
" keys pretier
|
|
|
|
vmap <leader>f <Plug>(coc-format-selected)
|
|
|
|
nmap <leader>f <Plug>(coc-format-selected)
|
2024-03-09 18:56:44 +00:00
|
|
|
|
2024-03-24 16:29:35 +00:00
|
|
|
|
2024-03-09 18:56:44 +00:00
|
|
|
|
|
|
|
lua <<EOF
|
|
|
|
|
2024-10-15 18:06:54 +00:00
|
|
|
|
2024-10-14 15:59:35 +00:00
|
|
|
|
2024-03-24 16:29:35 +00:00
|
|
|
--AutocloseTag setup
|
|
|
|
require("autoclose").setup()
|
|
|
|
|
2024-10-14 06:49:09 +00:00
|
|
|
--Line
|
|
|
|
require('hlchunk').setup({
|
|
|
|
indent = {
|
|
|
|
chars = {
|
|
|
|
"│",
|
|
|
|
},
|
|
|
|
style = {
|
|
|
|
"#FF0000",
|
|
|
|
"#FF7F00",
|
|
|
|
"#FFFF00",
|
|
|
|
"#00FF00",
|
|
|
|
"#00FFFF",
|
|
|
|
"#0000FF",
|
|
|
|
"#8B00FF",
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
2024-10-15 18:06:54 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
EOF
|
|
|
|
|
|
|
|
|
|
|
|
lua << EOF
|
|
|
|
-- LSP setup
|
|
|
|
|
|
|
|
local nvim_lsp = require('lspconfig')
|
|
|
|
|
|
|
|
-- Enable some language servers with the additional completion capabilities offered by nvim-cmp
|
|
|
|
local servers = { 'pyright', 'tsserver', 'clangd', 'sumneko_lua' }
|
|
|
|
for _, lsp in ipairs(servers) do
|
|
|
|
nvim_lsp[lsp].setup {
|
|
|
|
capabilities = require('cmp_nvim_lsp').update_capabilities(vim.lsp.protocol.make_client_capabilities())
|
|
|
|
}
|
|
|
|
end
|
|
|
|
EOF
|
|
|
|
|
|
|
|
lua << EOF
|
|
|
|
|
|
|
|
-- nvim-cmp setup
|
|
|
|
local cmp = require 'cmp'
|
|
|
|
|
|
|
|
cmp.setup {
|
|
|
|
snippet = {
|
|
|
|
expand = function(args)
|
|
|
|
vim.fn["vsnip#anonymous"](args.body)
|
|
|
|
end,
|
|
|
|
},
|
|
|
|
mapping = {
|
|
|
|
['<C-d>'] = cmp.mapping.scroll_docs(-4),
|
|
|
|
['<C-f>'] = cmp.mapping.scroll_docs(4),
|
|
|
|
['<C-Space>'] = cmp.mapping.complete(),
|
|
|
|
['<C-e>'] = cmp.mapping.close(),
|
|
|
|
['<CR>'] = cmp.mapping.confirm({
|
|
|
|
behavior = cmp.ConfirmBehavior.Replace,
|
|
|
|
select = true,
|
|
|
|
}),
|
|
|
|
},
|
|
|
|
sources = {
|
|
|
|
{ name = 'nvim_lsp' },
|
|
|
|
{ name = 'vsnip' },
|
|
|
|
{ name = 'buffer' },
|
|
|
|
{ name = 'path' },
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
-- Use buffer source for `/`
|
|
|
|
cmp.setup.cmdline('/', {
|
|
|
|
sources = {
|
|
|
|
{ name = 'buffer' }
|
|
|
|
}
|
|
|
|
})
|
|
|
|
|
|
|
|
-- Use cmdline & path source for ':'
|
|
|
|
cmp.setup.cmdline(':', {
|
|
|
|
sources = cmp.config.sources({
|
|
|
|
{ name = 'path' }
|
|
|
|
}, {
|
|
|
|
{ name = 'cmdline' }
|
|
|
|
})
|
|
|
|
})
|
|
|
|
EOF
|
|
|
|
|
|
|
|
lua << EOF
|
|
|
|
-- lsp_signature setup
|
|
|
|
require'lsp_signature'.setup({
|
|
|
|
bind = true, -- This is mandatory, otherwise border config won't get registered.
|
|
|
|
handler_opts = {
|
|
|
|
border = "rounded"
|
|
|
|
}
|
|
|
|
})
|
|
|
|
EOF
|
|
|
|
|
|
|
|
lua << EOF
|
|
|
|
-- nvim-lightbulb setup
|
|
|
|
require('nvim-lightbulb').setup({
|
|
|
|
autocmd = { enabled = true },
|
|
|
|
})
|
2024-03-09 20:26:29 +00:00
|
|
|
EOF
|