An open API service indexing awesome lists of open source software.

https://github.com/younghakim7/nvim_gysetting


https://github.com/younghakim7/nvim_gysetting

Last synced: 4 months ago
JSON representation

Awesome Lists containing this project

README

        


rust1
ferris

nvim
vim


# Contents

- [설치하다가 작살나면 캐쉬 삭제하기rm -rf ~/.config/nvim](#%EC%84%B8%ED%8C%85%ED%95%98%EB%8B%A4%EA%B0%80-%EC%9E%91%EC%82%B4%EB%82%98%EB%A9%B4-%EC%BA%90%EC%89%AC%EC%82%AD%EC%A0%9C-%ED%95%B4%EC%A3%BC%EA%B8%B0)
- [러스트 LSP세팅 Rust LSP Setting](#rust-lsp-setting)
- [nvim gcc로 커멘트 처리하기 comment](#nvim_gysetting)
- [내 neovim key 세팅](#key-setting)
- [neovim용 surround key 익히기 단축키 알아보기surround neovim surround vim에서 더 좋은거 하나 추가](#nvim---surround)
- [내가 주로 쓰는 LspInlayhint Color 색깔 ](#lsp-inlayhints-color-settinglspinlayhint로-해야-comment까지-안됨)


# My LunarVim Setting

- https://github.com/YoungHaKim7/lvim_Rust_AI_Setting

# Windows에 쓸만한 NeoVim

- https://github.com/YoungHaKim7/nvim_gy_NvChad_version


# lsp-inlayhints Color Setting(LspInlayHint로 해야 Comment까지 안됨)[[🔝]](#contents)

```
:hi LspInlayHint guifg=#35638f guibg=#420517

// 요즘 쓰는 색 240106
:hi LspInlayHint guifg=#35638f guibg=#420517
:hi Comment guifg=#35638f guibg=#420517
```

# nvim_gysetting[[🔝]](#contents)

```
Visual Mode에서는
gc

다시 gc누르면 커멘트 해지

Nomal Mode에서는(한줄만 주석처리)
gcc

toggler = {
---Line-comment toggle keymap
line = 'gcc',
```

# Key Setting[[🔝]](#contents)

```
-- Normal Mode
key_map("n", "W", ":wqall", opts)
key_map("n", "e", ":Neotree", opts)
key_map("n", "t", ":TroubleToggle", opts)
key_map("n", "o", ":SymbolsOutline", opts)

-- buffer new
key_map("n", "bt", ":tabe", opts)
key_map("n", "btt", ":terminal", opts)
-- buffer kill
key_map("n", "bd", ":bd", opts)
-- buffer next,previous tabe
key_map("n", "L", "gt", opts)
key_map("n", "H", "gT", opts)

-- Insert Mode
key_map("i","jk", "", opts)
```

# LSP key map[[🔝]](#contents)

```
vim.keymap.set("n", "", vim.lsp.buf.definition, keymap_opts)
vim.keymap.set("n", "K", vim.lsp.buf.hover, keymap_opts)
vim.keymap.set("n", "gD", vim.lsp.buf.implementation, keymap_opts)
vim.keymap.set("n", "", vim.lsp.buf.signature_help, keymap_opts)
vim.keymap.set("n", "1gD", vim.lsp.buf.type_definition, keymap_opts)
vim.keymap.set("n", "gr", vim.lsp.buf.references, keymap_opts)
vim.keymap.set("n", "g0", vim.lsp.buf.document_symbol, keymap_opts)
vim.keymap.set("n", "gW", vim.lsp.buf.workspace_symbol, keymap_opts)
vim.keymap.set("n", "gd", vim.lsp.buf.definition, keymap_opts)
vim.keymap.set("n", "ga", vim.lsp.buf.code_action, keymap_opts)
vim.keymap.set("n", "rn", vim.lsp.buf.rename, keymap_opts)
```

# LSP key세팅[[🔝]](#contents)

```
local lsp = require("lsp-zero")

lsp.preset("recommended")

-- make sure rust is isntalled,
lsp.ensure_installed({
'rust_analyzer',
})

-- Fix Undefined global 'vim'
lsp.configure('lua-language-server', {
settings = {
Lua = {
diagnostics = {
globals = { 'vim' }
}
}
}
})

-- mappings:
local cmp = require('cmp')
local cmp_select = {behavior = cmp.SelectBehavior.Select}
local cmp_mappings = lsp.defaults.cmp_mappings({
[''] = cmp.mapping.select_prev_item(cmp_select),
[''] = cmp.mapping.select_next_item(cmp_select),
[''] = cmp.mapping.confirm({ select = true }),
[""] = cmp.mapping.complete(),
})

lsp.setup_nvim_cmp({
mapping = cmp_mappings
})

lsp.set_preferences({
suggest_lsp_servers = false,
sign_icons = {
error = ' ',
warn = ' ',
hint = '󱧡 ',
info = ' '
}
})

lsp.setup()

vim.diagnostic.config({
virtual_text = true
})

```

# Nvim - Surround[[🔝]](#contents)

- https://github.com/kylechui/nvim-surround

```
Old text Command New text
--------------------------------------------------------------------------------
surr*ound_words ysiw) (surround_words)
*make strings ys$" "make strings"
[delete ar*ound me!] ds] delete around me!
remove HTML t*ags dst remove HTML tags
'change quot*es' cs'" "change quotes"
or tag* types csth1

or tag types


delete(functi*on calls) dsf function calls

```


# 세팅하다가 작살나면 캐쉬삭제 해주기[[🔝]](#contents)

```
// 백업
mkdir ~/backup_nvim
cp -r ~/.config/nvim ~/backup_nvim
cp -r ~/.local/share/nvim ~/backup_nvim
cp -r ~/.cache/nvim ~/backup_nvim

// 캐쉬삭제
rm -rf ~/.config/nvim
rm -rf ~/.local/share/nvim
rm -rf ~/.cache/nvim
```

- https://docs.rockylinux.org/ko/books/nvchad/install_nvchad/

# install and use packer in neovim[[🔝]](#contents)

- https://linovox.com/install-and-use-packer-in-neovim/

# mason [[🔝]](#contents)

- https://github.com/williamboman/mason.nvim

# Rust LSP setting[[🔝]](#contents)
https://sharksforarms.dev/posts/neovim-rust/

# NerdFont Ininstall[[🔝]](#contents)

- https://www.nerdfonts.com/

# 에러해결 error [[🔝]](#contents)

- smp-vsnip(snippet해결)
- https://github.com/hrsh7th/nvim-cmp/issues/24

# Inlay Hint 바로 옆에 뜨게 하기[[🔝]](#contents)
- 단서1 https://stackoverflow.com/questions/77193939/enable-inlayhints-in-neovim-with-lsp-zero
- 단서2 https://www.reddit.com/r/neovim/comments/14e41rb/today_on_nightly_native_lsp_inlay_hint_support/
- 단서3 https://github.com/lvimuser/lsp-inlayhints.nvim

# NeoVim Tutorial[[🔝]](#contents)
- https://github.com/mjlbach/starter.nvim