Compare commits
2 Commits
f7af399741
...
df373e3dd7
Author | SHA1 | Date | |
---|---|---|---|
|
df373e3dd7 | ||
|
f607e79660 |
29
README.md
29
README.md
@ -11,7 +11,7 @@
|
||||
* 👉 Výhody Neovim oproti klasickému IDE jsou nesporně ve svobodě konfigurace, je tisíce možností, jak Váš Neovim může vypadat a fungovat. Pro Vaši inspiraci a použití vznikl tento projekt 🚀 ApolloNvim.
|
||||
* 👉 Tato distribuce nefunguje jen, že kliknete na tlačítko a nainstaluje se. Vede Vás k samostatné instalaci pomocí tohoto webu. Cílem je pochopit, jak Neovim funguje, abyste si sami mohli vše modifikovat, což i click-on distribucí se nenaučíte.
|
||||
* 👉 Toto nastavení jsem vytvořil pro vývoj webu. Inspiroval jsem se pluginy, které jsem využíval v VSCode a Webstorm.
|
||||
* 👉 V říjnu 2024 byla nově přidána podpora PHP.
|
||||
* 👉 V říjnu 2024 byla nově přidána podpora PHP a také Automatická instalace puginu.
|
||||
* 👉 Velký důraz je kladen na rychlost a lehkost.
|
||||
* 👉 🚀 ApolloNvim Distro je pravidelně aktualizováno tak i celý projekt.
|
||||
* 👉 Pro nejlepší zážitek s 🚀 ApolloNvim Distro doporučuji používat multiplexor [Zellij](https://git.arch-linux.cz/kankys/zellij-mySetup), ale není to samozřejmě podmínkou.
|
||||
@ -40,18 +40,8 @@
|
||||
* 👉 [Vim-Fugitive](https://github.com/tpope/vim-fugitive) plugin pro git.
|
||||
* 👉 [Colorizer](https://github.com/lilydjwg/colorizer) plugin pro náhled barev dle kódového označení.
|
||||
* 👉 [Vim - javascript](https://github.com/pangloss/vim-javascript) plugin pro podporu javascript.
|
||||
* 👉 [NVIM-CMP](https://github.com/hrsh7th/nvim-cmp) sada nástrojů pro lepší komfort ovládání nvim. Jako jsou nápovědy, doplňování příkazů a mnoho dalšího.
|
||||
- V této sadě najdeš tyto pluginy:
|
||||
- Plug 'neovim/nvim-lspconfig'
|
||||
- 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'
|
||||
- Plug 'ray-x/lsp_signature.nvim'
|
||||
- Plug 'kosayoda/nvim-lightbulb'
|
||||
* 👉 [Rainbow Vim](https://github.com/frazrepo/vim-rainbow) vytvoří barevné závorky.
|
||||
|
||||
|
||||
### Coc extensions:
|
||||
* 👉 [Coc](https://github.com/neoclide/coc.nvim) manager pro instalování doplňků do Neovim.
|
||||
@ -71,6 +61,10 @@
|
||||
* 👉 coc-webview
|
||||
* 👉 coc-phpls
|
||||
* 👉 coc-prettier
|
||||
* 👉 coc-eslint
|
||||
* 👉 coc-highlighting
|
||||
* 👉 coc-git
|
||||
|
||||
|
||||
### Colorschemes v tomto projektu:
|
||||
* 👉 [Dracula](https://github.com/dracula/vim)téma Dracula pro Neovim.
|
||||
@ -102,15 +96,15 @@
|
||||
|
||||
Linux & Mac:
|
||||
|
||||
```
|
||||
``
|
||||
/home/user/.config/nvim/init.vim
|
||||
```
|
||||
``
|
||||
|
||||
Windows:
|
||||
|
||||
```
|
||||
``
|
||||
~/AppData/Local/nvim/init.vim
|
||||
```
|
||||
``
|
||||
|
||||
### Node.js:
|
||||
* 👉 Doporučuji i mít nainstalovaný [Node.js](https://nodejs.org/en)
|
||||
@ -168,6 +162,7 @@ Windows:
|
||||
![SAT](https://lukan.cz/wp-content/uploads/2024/03/sat-150x150.jpeg)
|
||||
|
||||
### Další projekty a odkazy:
|
||||
* 👉 [Web autora tohoto projektu](https://lukaskanka.cz/)
|
||||
* 👉 [ArchLinux CZ](https://arch-linux.cz/)
|
||||
* 👉 [Vyhledávač SearXNG CZ](https://searxng.cz/)
|
||||
* 👉 [EndeavourOS Linux](https://endeavouros.cz/)
|
||||
|
68
init.vim
68
init.vim
@ -19,7 +19,9 @@ imap <silent><expr> <TAB> coc#pum#visible() ? coc#pum#confirm() : "\<TAB>"
|
||||
|
||||
Plug 'othree/html5.vim'
|
||||
|
||||
Plug 'shellRaining/hlchunk.nvim' " Propojovací lajny v kódu (lua)
|
||||
Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}
|
||||
|
||||
Plug 'shellRaining/hlchunk.nvim' " Propojovací lajny v kódu (lua)
|
||||
|
||||
" Plug 'Exafunction/codeium.vim', { 'branch': 'main' } " Free AI codium
|
||||
|
||||
@ -41,8 +43,9 @@ Plug 'lilydjwg/colorizer' " Náhled barev css
|
||||
|
||||
Plug 'Pocco81/auto-save.nvim' " Autosave
|
||||
|
||||
Plug 'pangloss/vim-javascript'
|
||||
Plug 'nvim-lua/plenary.nvim'
|
||||
|
||||
Plug 'pangloss/vim-javascript'
|
||||
|
||||
" Theme
|
||||
Plug 'dracula/vim', { 'as': 'dracula' }
|
||||
@ -79,10 +82,10 @@ Plug 'nordtheme/vim'
|
||||
|
||||
" CMP setup
|
||||
|
||||
" LSP
|
||||
"LSP
|
||||
Plug 'neovim/nvim-lspconfig'
|
||||
|
||||
" Autocompletion
|
||||
"Autocompletion
|
||||
Plug 'hrsh7th/nvim-cmp'
|
||||
Plug 'hrsh7th/cmp-nvim-lsp'
|
||||
Plug 'hrsh7th/cmp-buffer'
|
||||
@ -91,15 +94,14 @@ Plug 'hrsh7th/cmp-cmdline'
|
||||
Plug 'hrsh7th/cmp-vsnip'
|
||||
Plug 'hrsh7th/vim-vsnip'
|
||||
|
||||
" LSP Signature
|
||||
"LSP Signature
|
||||
Plug 'ray-x/lsp_signature.nvim'
|
||||
|
||||
" Lightbulb
|
||||
"Lightbulb
|
||||
Plug 'kosayoda/nvim-lightbulb'
|
||||
|
||||
call plug#end()
|
||||
|
||||
|
||||
" Autostart NERDTree
|
||||
" autocmd VimEnter * call NERDTreeFocus() " Autostart NERDTreeFocus
|
||||
|
||||
@ -109,8 +111,8 @@ nmap <C-k> <plug>NERDCommenterToggle
|
||||
vmap <C-l> <plug>NERDCommenterToggle<CR>
|
||||
|
||||
" Atomaticky po startu theme
|
||||
colorscheme dracula
|
||||
autocmd VimEnter * colorscheme dracula
|
||||
colorscheme gruvbox
|
||||
autocmd VimEnter * colorscheme gruvbox
|
||||
|
||||
" Autosave
|
||||
let g:auto_save_enabled = 1
|
||||
@ -125,32 +127,8 @@ nmap <leader>f <Plug>(coc-format-selected)
|
||||
|
||||
lua <<EOF
|
||||
|
||||
|
||||
|
||||
--AutocloseTag setup
|
||||
require("autoclose").setup()
|
||||
|
||||
--Line
|
||||
require('hlchunk').setup({
|
||||
indent = {
|
||||
chars = {
|
||||
"│",
|
||||
},
|
||||
style = {
|
||||
"#FF0000",
|
||||
"#FF7F00",
|
||||
"#FFFF00",
|
||||
"#00FF00",
|
||||
"#00FFFF",
|
||||
"#0000FF",
|
||||
"#8B00FF",
|
||||
},
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
EOF
|
||||
|
||||
@ -231,3 +209,27 @@ require('nvim-lightbulb').setup({
|
||||
autocmd = { enabled = true },
|
||||
})
|
||||
EOF
|
||||
|
||||
lua << EOF
|
||||
require'nvim-treesitter.configs'.setup {
|
||||
highlight = {
|
||||
enable = true,
|
||||
},
|
||||
indent = {
|
||||
enable = true,
|
||||
},
|
||||
}
|
||||
EOF
|
||||
|
||||
lua << EOF
|
||||
require('hlchunk').setup({
|
||||
chunk = {
|
||||
enable = true
|
||||
-- ...
|
||||
},
|
||||
indent = {
|
||||
enable = true
|
||||
-- ...
|
||||
}
|
||||
})
|
||||
EOF
|
||||
|
233
init_English.vim
233
init_English.vim
@ -1,233 +0,0 @@
|
||||
set number " displays line numbers
|
||||
set wrap " breaks the code on the line
|
||||
set cursorline " highlights the line with the cursor
|
||||
set noshowmode
|
||||
set title " displays the name and path of the file
|
||||
set clipboard=unnamedplus " allow copying and pasting outside Neovim
|
||||
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', 'php'] }
|
||||
|
||||
" Adding a keyboard shortcut to confirm the help in the code with the TAB key
|
||||
imap <silent><expr> <TAB> coc#pum#visible() ? coc#pum#confirm() : "\<TAB>"
|
||||
|
||||
Plug 'othree/html5.vim' " Support HTML5
|
||||
|
||||
Plug 'shellRaining/hlchunk.nvim' " Link lines in the code (lua)
|
||||
|
||||
" Plug 'Exafunction/codeium.vim', { 'branch': 'main' } " Free AI codium
|
||||
|
||||
Plug 'm4xshen/autoclose.nvim' " AutocloseTag (lua)
|
||||
|
||||
Plug 'https://github.com/scrooloose/nerdtree' " NERDTree lateral tree panel
|
||||
|
||||
Plug 'neoclide/coc.nvim', {'branch': 'release'} "Coc packages systems
|
||||
|
||||
Plug 'mhinz/vim-startify' " Alternativní start screen
|
||||
|
||||
Plug 'preservim/nerdcommenter' " NERD Commenter - comments code
|
||||
|
||||
Plug 'wakatime/vim-wakatime' " Wakatime
|
||||
|
||||
Plug 'tpope/vim-fugitive' " Git - vim fugitive
|
||||
|
||||
Plug 'lilydjwg/colorizer' " View color css
|
||||
|
||||
Plug 'Pocco81/auto-save.nvim' " Autosave
|
||||
|
||||
Plug 'pangloss/vim-javascript'
|
||||
|
||||
|
||||
" Theme
|
||||
Plug 'dracula/vim', { 'as': 'dracula' }
|
||||
|
||||
Plug 'Tsuzat/NeoSolarized.nvim', { 'branch': 'master' }
|
||||
|
||||
Plug 'bluz71/vim-moonfly-colors', { 'as': 'moonfly' }
|
||||
|
||||
Plug 'ghifarit53/tokyonight-vim'
|
||||
|
||||
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'
|
||||
|
||||
Plug 'sts10/vim-pink-moon'
|
||||
|
||||
Plug 'gilgigilgil/anderson.vim'
|
||||
|
||||
Plug 'jacoborus/tender.vim'
|
||||
|
||||
Plug 'nordtheme/vim'
|
||||
|
||||
" 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'
|
||||
|
||||
call plug#end()
|
||||
|
||||
|
||||
" Autostart NERDTree
|
||||
" autocmd VimEnter * call NERDTreeFocus() " Autostart NERDTreeFocus
|
||||
|
||||
" Comments NERD Commenter key map Ctrl + k + l
|
||||
let mapleader=","
|
||||
nmap <C-k> <plug>NERDCommenterToggle
|
||||
vmap <C-l> <plug>NERDCommenterToggle<CR>
|
||||
|
||||
" Atomaticstart theme
|
||||
colorscheme dracula
|
||||
autocmd VimEnter * colorscheme dracula
|
||||
|
||||
" Autosave
|
||||
let g:auto_save_enabled = 1
|
||||
let g:auto_save_delay = 3000
|
||||
let g:auto_save_events = ['InsertLeave', 'TextChanged']
|
||||
|
||||
" keys pretier
|
||||
vmap <leader>f <Plug>(coc-format-selected)
|
||||
nmap <leader>f <Plug>(coc-format-selected)
|
||||
|
||||
|
||||
|
||||
lua <<EOF
|
||||
|
||||
|
||||
|
||||
--AutocloseTag setup
|
||||
require("autoclose").setup()
|
||||
|
||||
--Line
|
||||
require('hlchunk').setup({
|
||||
indent = {
|
||||
chars = {
|
||||
"│",
|
||||
},
|
||||
style = {
|
||||
"#FF0000",
|
||||
"#FF7F00",
|
||||
"#FFFF00",
|
||||
"#00FF00",
|
||||
"#00FFFF",
|
||||
"#0000FF",
|
||||
"#8B00FF",
|
||||
},
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
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 },
|
||||
})
|
||||
EOF
|
Loading…
Reference in New Issue
Block a user