lua-dev.nvim - nvim์—์„œ lua ๊ฐœ๋ฐœ ํ™˜๊ฒฝ ๊ตฌ์„ฑ ํ”Œ๋Ÿฌ๊ทธ์ธ

Intro lua๋กœ ํ”„๋กœ๊ทธ๋ž˜๋ฐ์„ ํ•  ๋•Œ ํ•จ์ˆ˜๋‚˜ ์ž๋™์™„์„ฑ์„ ๋„์™€์ฃผ๋Š” ํ”Œ๋Ÿฌ๊ทธ์ธ์ด๋‹ค. nvim์˜ lua ๋‚ด์žฅํ•จ์ˆ˜ ๋ฐ api๋„ ์ง€์›ํ•œ๋‹ค. ๋‹ค๋ฅธ lsp ์„œ๋ฒ„์˜ ์„ค์น˜์™€ ์„ค์ •๋ณด๋‹ค ์–ด๋ ค์›Œ์„œ ๋งŽ์ด ๊ณ ์ƒํ–ˆ๋‹ค. ๊ฐ€์žฅ ์ค‘์š”ํ•œ ๊ฒƒ์€ lua-language-server๋ฅผ ์ œ๋Œ€๋กœ ์„ค์น˜ํ•˜๋Š” ๊ฒƒ์ด๋‹ค. ์„œ๋ฒ„๋ฅผ ์ปดํŒŒ์ผ ํ•˜๋Š” ๊ฒƒ๋ณด๋‹ค๋Š” ๋ฐ”์ด๋„ˆ๋ฆฌ๋ฅผ ๋‹ค์šด ๋ฐ›์•„ ์“ฐ๋Š” ๊ฒƒ์„ ๊ถŒ์žฅํ•œ๋‹ค. Requirements nvim-cmp :์ž๋™์™„์„ฑ ํ”Œ๋Ÿฌ๊ทธ์ธ nvim-lsp :Language Server Protocol ํ”Œ๋Ÿฌ๊ทธ์ธ cmp-nvim-lsp : lsp ์ž๋™์™„์„ฑ ์ง€์› ํ”Œ๋Ÿฌ๊ทธ์ธ sumneko lua-language-server : Lua lsp server ํ”„๋กœ๊ทธ๋žจ (lua 5.1 ~ 5.4, luaJit ๋ชจ๋‘ ์ง€์›) lua-language-server Install ์•„๋ž˜์—์„œ ์ปดํŒŒ์ผ๋œ ๋ฐ”์ด๋„ˆ๋ฆฌ ๋‹ค์šด๋กœ๋“œ (๋ฆฌ๋ˆ…์Šค 64bit๊ธฐ์ค€) https://github.com/sumneko/lua-language-server/releases ์ ๋‹นํ•œ ์œ„์น˜์— ์„ค์น˜ $ mkdir ~/data/lua-language-server && cd lua-language-server $ tar xvfz ~/Download/lua-language-server-3.5.5.tar.gz . $ cat <<EOF > ~/bin/lua-language-server # ์‹คํ–‰์Šคํฌ๋ฆฝํŠธ ์ž‘์„ฑ #!/usr/bin/bash exec "~/data/lua-language-server/bin/lua-language-server" "$@" EOF $ chmod u+x ~/bin/lua-language-server # ~/bin ์ด PATH์— ์„ค์ •๋˜์–ด ์žˆ์–ด์•ผ $ lua-language-server --version # ์—๋Ÿฌ ์—†์ด ๋ฒ„์ „์ด ์ถœ๋ ฅ๋˜๋ฉด ์„ฑ๊ณต lua-dev Install ๋จผ์ € nvim-cmp nvim-lsp, cmp-nvim-lsp๊ฐ€ ์„ค์น˜ ๋ฐ ์„ค์ •๋˜์—ˆ๋‹ค๊ณ  ๊ฐ€์ •ํ•œ๋‹ค. ...

2022-09-12 ยท (updated 2022-10-31) ยท 245 words

nvim-tree - File Explorer

Cut, copy, paste, rename, delete, create ์‚ฌ์šฉ๋ฒ• ์ถ”๊ฐ€ Git Integration Diagnostic Integration (LSP, COC) Live Filtering ๊ฐœ์ธํ™” ์„ค์ • ์†Œ๊ฐœ ๋น ๋ฅด๊ณ  ์‚ฌ์šฉ์ด ํŽธ๋ฆฌํ•˜๋ฉฐ nvim์—์„œ NerdTree๋ฅผ ๋Œ€์ฒดํ•  ๋งŒํ•œ ํ”Œ๋Ÿฌ๊ทธ์ธ์ด๋‹ค. ๊ธฐ๋Šฅ์ด ์•„์ฃผ ๋งŽ๋‹ค. ์กฐ๊ธˆ์”ฉ ๊ณต๋ถ€ํ•ด์„œ ํ™œ์šฉํ•˜์ž. ์„ค์น˜ Add plugin set to ~/.config/nvim/lua/plugins.lua use 'kyazdani42/nvim-web-devicons' -- web-devicons (optional) use 'kyazdani42/nvim-tree.lua' -- file explorer Install Package in command line mode :w :luafile % :PackerInstall Add nvim-tree setup to ~/.config/nvim/lua/settings.lua -- nvim-tree ์„ค์ • require'nvim-tree'.setup() -- ์„ค์ • ๋กœ๋“œ ๋ฐ ์ดˆ๊ธฐํ™” nmap('<F2>',':NvimTreeToggle<CR>') -- ํ† ๊ธ€ ํ‚ค๋งต ์„ค์ • Source settings.lua in command line mode :w :luafile % ๊ธฐ๋ณธ ํ‚ค๋งคํ•‘ ์ž์ฃผ ์“ฐ๋Š” ๊ฒƒ๋งŒ ์š”์•ฝํ•˜๊ณ  ์ž์„ธํ•œ ๊ฒƒ์€ ์•„๋ž˜ ์ฃผ์†Œ ์ฐธ์กฐ. ...

2022-09-10 ยท 189 words

Lua Quick Guide - tutorialspoint

Basic Tokens in Lua io.write("Hello world, from ",_VERSION,"!\n") Comments -- simple comment --[[ block comments --]] identifiers - ๋ณ€์ˆ˜๋ช…, ํ•จ์ˆ˜๋ช… ๋“ฑ ๊ทœ์น™ mohd zera abc move_name a_123 myname50 _temp a23b9 retVal Keywords - ์˜ˆ์•ฝ์–ด and break do else elseif end false for function if in local nil not or repeat return then true until while Lua - Variables Global variables, Local bariables, Table fields Variable Example -- Variable definition: local a, b --local g,l = 20,30 --global -- Initialization a = 10 b = 30 print("value of a:", a) print("value of b:", b) -- Swapping of variables b, a = a, b print("value of a:", a) print("value of b:", b) f = 70.0/3.0 print("value of f", f) Data Types nil - no data boolean - ture, false number - read numbers string - array of characters function - method that is written in C or Lua userdata - C data thread - independent threads of execution table - arrays, symbol tables, sets, records, graphs, trees, etc ...

2022-09-09 ยท 2184 words

SpaceVim - A community-driven vim distribution

์„ค์น˜ vim ๋˜๋Š” neovim์„ ๋จผ์ € ์„ค์น˜ํ•œ๋‹ค. ๋‘˜ ๋‹ค ์„ค์น˜๋˜์–ด ์žˆ๋Š” ๊ฒฝ์šฐ ํ•˜๋‚˜๋งŒ ๋™์ž‘ํ•˜๋„๋ก ์•„๋ž˜ ๋ช…๋ น์–ด๋กœ ์„ค์น˜ํ•œ๋‹ค. $ curl -sLf https://spacevim.org/install.sh | bash -s -- --install vim $ curl -sLf https://spacevim.org/install.sh | bash -s -- --install neovim $ vim ~/.config/nvim ์•„๋ž˜ ๋ ˆํผ๋Ÿฐ์Šค๋ฅผ ์ฐธ๊ณ ํ•œ๋‹ค. ์‚ฌ์šฉํ•˜๋Š” ์ฝ”๋”ฉ ์–ธ์–ด๋ฅผ layer๋กœ ๋“ฑ๋กํ•ด์ฃผ๋ฉด ๊ฑฐ์˜ ๋ชจ๋“  ๊ฒƒ์ด ํ•ด๊ฒฐ๋œ๋‹ค. ์•„์šธ๋Ÿฌ ๊ฐ ์–ธ์–ด์— ๋Œ€ํ•œ ์„ค์ •๋ฒ•๋„ ์ฐธ๊ณ  (๋‹จ์ถ•ํ‚ค๋„ ์ •๋ฆฌ) vimproc Error neovim์œผ๋กœ spacevim์„ ์„ค์น˜ํ•˜๊ณ  ์‹คํ–‰ํ–ˆ๋Š”๋ฐ ์œ„ ์—๋Ÿฌ๊ฐ€ ๋‚˜๋Š” ๊ฒฝ์šฐ $ cd ~/.SpaceVim/bundle/vimproc.vim $ make $ nvim Links Quick Start Guide https://spacevim.org/quick-start-guide/ Python Set https://spacevim.org/use-vim-as-a-python-ide/ Rust Set https://spacevim.org/use-vim-as-a-rust-ide/

2022-09-09 ยท 87 words

AstroNvim

Intro neovim(nvim)์— ๋‹ค์–‘ํ•œ ์„ค์ •๊ณผ ํ”Œ๋Ÿฌ๊ทธ์ธ์„ ํ†ตํ•˜์—ฌ ๊ฐœ๋ฐœํ™˜๊ฒฝ IDE๋ฅผ ๊ตฌ์„ฑ Lua ๋ฅผ ๊ธฐ๋ฐ˜์œผ๋กœ ๊ตฌ์„ฑํ•˜์˜€๊ธฐ ๋•Œ๋ฌธ์— ๋น ๋ฅด๊ณ  ์พŒ์ ํ•˜๋‹ค. ์ž๋™์™„์„ฑ, ํŒŒ์ผํƒ์ƒ‰, ๊ฒ€์ƒ‰๊ธฐ๋Šฅ, snipet๋“ฑ ํ•„์š”ํ•œ ๊ฑฐ์˜ ๋ชจ๋“  ๊ฒƒ์ด ๊ธฐ๋ณธ ์ œ๊ณต๋œ๋‹ค. ์ถ”๊ฐ€๋กœ ์‚ฌ์šฉ์ž ์ •์˜๋ฅผ ํ•  ์ˆ˜ ์žˆ๋‹ค. Install $ mv ~/.config/nvim ~/.config/nvim.bak # ๊ธฐ์กด nvim ์„ค์ •์„ ๋ฐฑ์—… $ mv ~/.local/share/nvim/site ~/.local/share/nvim/site.bak # ๊ธฐ์กด ํ”Œ๋Ÿฌ๊ทธ์ธ ๋ฐฑ์—… $ git clone https://github.com/AstroNvim/AstroNvim ~/.config/nvim # ๋ณต์‚ฌ $ nvim +PackerSync # ์„ค์น˜ Setup Install LSP (Language Server Protocol) - ํ”„๋กœ๊ทธ๋ž˜๋ฐ ์–ธ์–ด ์ง€์› ์„ค์น˜ ๋‚˜์ค‘์— ์ถ”๊ฐ€ ์„ค์น˜์‹œ Space + l + I ๋งตํ‚ค ์‚ฌ์šฉ :LspInstall clangd - c, c++ :LspInstall rust-analyzer - rust :LspInstall luau-lsp - lua :LspInstall marksman - markdown :LspInstall jedi-language-server - python3 Install Language Parser ...

2022-09-03 ยท 410 words