diff --git a/README.md b/README.md index e1403be..0740c27 100644 --- a/README.md +++ b/README.md @@ -41,27 +41,7 @@ # Panduan Install Dan Konfigurasi NeoVim -# Daftar Isi -- [Kebutuhan Dasar](#Kebutuhan-Dasar) -- [Panduan Windows](#Panduan-Windows) -- [Panduan Linux Debian Based](#Panduan-Linux-Debian-Based) -- [Configurasi](#Configurasi) - - [KeyMap](#KeyMap) - - [Config LSP](#Config-LSP) - - [Comfig Treesitter](#Comfig-Treesitter) - - [Ubah Dashboard](#Ubah-Dashboard) - - [Custom Null-ls](#Custom-Null-ls) - - [Register LSP](#Register-LSP) - - [Whichkey](#Whichkey) - - [Format On Save](#Format-On-Save) - - [Custom Autocommand](#Custom-Autocommand) - - [Cutom Default Option](#Cutom-Default-Option) - - [Custom Key Mapping](#Custom-Key-Mapping) - - [Custom Plugins](#Custom-Plugins) - - [Custom Sippets](#Custom-Snippets) -- [List Plugins](#List-Plugins) - -## Penjelsan Lebih Detail Silahkan Kunjungi Wiki +## Kunjungi Wiki ## Kebutuhan Dasar 1. Install Neovim 8.0+ https://github.com/neovim/neovim/releases/tag/v0.8.2 @@ -76,413 +56,17 @@ # Panduan Windows -- Pastikan sudah menginstall kebutuhan dasar diatas -- Jalankan Script Dibawah pada Powershell - ``` git clone https://github.com/pojokcodeid/nvim-lazy-basic.git "$env:LOCALAPPDATA\nvim" nvim ``` -# Panduan Linux Debian Based - -1. Pastikan Acess Administrator - -``` -visudo -[nama user] ALL=(ALL:ALL) ALL -[nama user] ALL=(ALL) NOPASSWD:ALL -``` - -2. Install Neovim - -```bash -sudo apt-get install wget -mkdir download -cd download -wget https://github.com/neovim/neovim/releases/download/v0.8.1/nvim-linux64.deb -sudo apt-get install ./nvim-linux64.deb -nvim --version -``` - -3. Check G++ - -```bash -g++ --version -``` - -4. Install NodeJS - -```bash -sudo apt-get install curl -sudo apt install build-essential libssl-dev -curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash -source ~/.bashrc -nvm install 18.13.0 -node --version -npm --version -``` - -5. Install unzip, ripgrep - -```bash -sudo apt-get install unzip -sudo apt-get install ripgrep -``` - -6. Install lazygit - -```bash -LAZYGIT_VERSION=$(curl -s "https://api.github.com/repos/jesseduffield/lazygit/releases/latest" | grep '"tag_name":' | sed -E 's/.*"v*([^"]+)".*/\1/') -curl -Lo lazygit.tar.gz "https://github.com/jesseduffield/lazygit/releases/latest/download/lazygit_${LAZYGIT_VERSION}_Linux_x86_64.tar.gz" -sudo tar xf lazygit.tar.gz -C /usr/local/bin lazygit -lazygit --version -``` - -7. Install Git - -```bash -sudo apt-get install git -git --version -``` - -8. Clone Config +# Panduan Linux ```bash git clone https://github.com/pojokcodeid/nvim-lazy-basic.git ~/.config/nvim ``` -# Configurasi - -- Struktur File
- -``` - . - ├── init.lua * Ini pintu masuk config - ├── lazy-lock.json * Ini file generate dari lazy.nvim - ├── lua - │   ├── custom - │   │   ├── dashboard.lua * Ini untuk custom dashboard - │   │   ├── format_onsave.lua * Ini untuk custom format ketika save - │   │   ├── lsp_installer.lua * Ini untuk config LSP tidak support mason - │   │   ├── null-ls.lua * Ini untuk config linter dan formatter - │   │   └── register_lsp.lua * Ini untuk registrasi LSP install dari mason - │   ├── default - │   │   ├── autocommands.lua * Ini untuk custom auto command - │   │   ├── init.lua * Ini pintu masuk untuk semua config - │   │   ├── keymaps.lua * Ini untuk custom keymaps - │   │   ├── lazy.lua * Ini config plugins manager (jangan diubah) - │   │   └── options.lua * Ini untuk custom config default neovim - │   └── plugin - │   ├── dapui.lua * Ini contoh plugin - │   ├── init.lua * Ini untuk menambah, disable dan overide plugins - │   └── lualine.lua * Ini contoh plugin -``` - -## KeyMap -- leader = space bar -- n = normal mode -- i = insert mode -- v = visual mode - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ModeKeyKeterangan
nleaderMembuka Wich Key
nleader + /Comment String
nleader + aAlpha dashboard
nleader + bBuffer
nleader + cClose Buffer
nleader + eExploler (Nvim Tree)
nleader + eExploler (Nvim Tree)
nleader + FPencarian Text
nleader + fPencarian File
nleader + hTidak ada hilight
nleader + oSymbol Outline
nleader + qKeluar Neovim
nleader + wSimpan File
nleader + ggit
nleader + lLSP
nleader + pPlugin (Lazy)
nleader + rRun Program
nleader + sPencarian
nleader + tTerminal
vleader + /Comment Blok String
ictrl + lLive Server
- -## Config LSP - -- Jalankan dengan commond mode - -``` -:MasonInstall html-lsp css-lsp typescript-language-server -``` - -- jika tidak terbaca lspnya tambahkan pada file lua/custom/register_lsp.lua -- Rujukan Lnguage Support
- https://github.com/williamboman/mason.nvim/blob/main/PACKAGES.md - -## Comfig Treesitter - -- Jalankan Code Berikut pada command - -```lua -:TSInstall html css javascript ..... dst -``` - -- Rujukan Language Support
- https://github.com/nvim-treesitter/nvim-treesitter#supported-languages - -## Ubah Dashboard - -### Cari File lua/custom/dashboard.lua - -- Edit Bagian ini - -```lua -M.dashboard = { - [[ __ ]], - [[ ___ ___ ___ __ __ /\_\ ___ ___ ]], - [[ / _ `\ / __`\ / __`\/\ \/\ \\/\ \ / __` __`\ ]], - [[/\ \/\ \/\ __//\ \_\ \ \ \_/ |\ \ \/\ \/\ \/\ \ ]], - [[\ \_\ \_\ \____\ \____/\ \___/ \ \_\ \_\ \_\ \_\]], - [[ \/_/\/_/\/____/\/___/ \/__/ \/_/\/_/\/_/\/_/]], -} - -``` -- Link Generate Dasboard - https://patorjk.com/software/taag/ - -## Custom Null-ls -### cari file lua/custom/null-ls.lua -- tambahkan pada bagian berikut -```lua -local m = { - sources = { - formatting.stylua, -- tambahkan di bawah sini - diagnostics.flake8, -- tambahkan di bawah sini - }, -} -``` -- Untuk acuan silahkan kunjungi :
-https://github.com/jose-elias-alvarez/null-ls.nvim/blob/main/doc/BUILTINS.md -## Register LSP -### Cari file lua/custom/register_lsp.lua -- ini dilakukan jika LSP tidak terbaca -```lua -local m = { - lspreg = { - "yamlls", - "jdtls", - "intelephense", - "marksman", - "csharp_ls", - "clangd", - "dartls", - "kotlin_language_server", - -- tambahkan di bawah sini setelah melakukan :masoninstall - }, -} -``` -- untuk acuan silahkan cek :
-https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md -## Whichkey -### cari file lua/custom/whichkey.lua --- file ini digunakan untuk registrasi key mapping -```lua -["k"] = { - name = "Example", - k = { 'lua print("Testing")', "Example" }, -}, -``` -## Format On Save -### cari file lua/custom/format_onsave.lua -- lakukan enable atau disable -```lua -local M = { - disable = 0, -- 0 ( format jalan) 1 (fromat off) -} -``` -## Custom Autocommand -### cari file lua/default/autocommand.lua -- Lakukan config sesuai kebutuhan -## Cutom Default Option -### cari file lua/default/options.lua -``` --- custom oprion disini - -vim.g.mapleader = " " -vim.g.maplocalleader = " " - -local opt = vim.opt -opt.cmdheight = 0 -``` -## Custom Key Mapping -### cari file lua/dafault/keymaps.lua -``` --- custom key maps disini -local function map(mode, l, r, desc) - vim.keymap.set(mode, l, r, { desc = desc }) -end --- ini adalah contoh -map("n", "]h", 'lua print("Testing")', "Testing Mapping") -``` -## Custom Plugins -### cari file lua/plugin/* -- masukan semua plugin pada folder tersebut -- disable plugins -``` -{ "folke/trouble.nvim", enabled = false }, -- ini untuk disable plugin -``` -- tambah plugins -``` -{"nvim-treesitter/nvim-treesitter"}, -``` -untuk panduan silahkan cek
-https://github.com/folke/lazy.nvim#Examples -## Custom-Snippets -### Cari File nvim/my-snippet/package.json -- tambahkan custom snippets pada bagian berikut -```json -"contributes": { - "snippets": [ - { - "language": "html", - "path": "./html/snippets/javascript.json" - }, - { - "language": "html", - "path": "./html/javascript/javascript.json" - }, - ] -} -``` -## Seting Bahasa Pemprograman - -- https://youtube.com/playlist?list=PLhzwHCJWMbnvhPy0wqZGVBRUEAgS93iuk - -## List Plugins - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
LinkKeterangan
https://github.com/folke/lazy.nvimLazy
https://github.com/nvim-lua/plenary.nvimPlenary
https://github.com/windwp/nvim-autopairsNvim-Autopairs
https://github.com/numToStr/Comment.nvimComment.nvim
https://github.com/JoosepAlviste/nvim-ts-context-commentstringnvim-ts-context-commentstring
https://github.com/nvim-tree/nvim-web-deviconsnvim-web-devicons
https://github.com/nvim-tree/nvim-tree.luanvim-tree.lua
https://github.com/akinsho/bufferline.nvimbufferline.nvim
https://github.com/moll/vim-bbyevim-bbye
https://github.com/akinsho/toggleterm.nvimtoggleterm.nvim
https://github.com/lewis6991/impatient.nvimimpatient.nvim
https://github.com/lukas-reineke/indent-blankline.nvimindent-blankline.nvim
https://github.com/goolord/alpha-nvimalpha-nvim
https://github.com/folke/which-key.nvimwhich-key.nvim
https://github.com/folke/tokyonight.nvimtokyonight.nvim
https://github.com/hrsh7th/nvim-cmpnvim-cmp
https://github.com/hrsh7th/cmp-buffercmp-buffer
https://github.com/nvim-treesitter/nvim-treesitternvim-treesitter
https://github.com/L3MON4D3/LuaSnipLuaSnip
https://github.com/windwp/nvim-autopairsnvim-autopairs
https://github.com/hrsh7th/cmp-nvim-luacmp-nvim-lua
https://github.com/neovim/nvim-lspconfignvim-lspconfig
https://github.com/williamboman/mason-lspconfig.nvimmason-lspconfig.nvim
https://github.com/williamboman/mason.nvimwilliamboman/mason.nvim
https://github.com/jose-elias-alvarez/null-ls.nvimnull-ls.nvim
https://github.com/jayp0521/mason-null-ls.nvimmason-null-ls.nvim
- -## key lazygit - -Key Lazygit - ## Terima Kasih https://github.com/LunarVim/Neovim-from-scratch