Update repository
This commit is contained in:
parent
022620ad24
commit
d0e294074b
|
@ -0,0 +1,28 @@
|
||||||
|
# Golang 开发
|
||||||
|
|
||||||
|
## module
|
||||||
|
|
||||||
|
### init a package
|
||||||
|
|
||||||
|
```bash
|
||||||
|
go mod init
|
||||||
|
```
|
||||||
|
|
||||||
|
### remove unused packages
|
||||||
|
|
||||||
|
```bash
|
||||||
|
go mod tidy
|
||||||
|
```
|
||||||
|
|
||||||
|
## dlv 调试
|
||||||
|
|
||||||
|
## vim-go/go-nvim
|
||||||
|
|
||||||
|
packages.Load error 处理:
|
||||||
|
|
||||||
|
清除缓存试试:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
go clean -cache
|
||||||
|
```
|
||||||
|
|
|
@ -1,13 +0,0 @@
|
||||||
# module usage
|
|
||||||
|
|
||||||
## init a package
|
|
||||||
|
|
||||||
```bash
|
|
||||||
go mod init
|
|
||||||
```
|
|
||||||
|
|
||||||
## remove unused packages
|
|
||||||
|
|
||||||
```bash
|
|
||||||
go mod tidy
|
|
||||||
```
|
|
|
@ -1,10 +0,0 @@
|
||||||
# Vim-go Usage
|
|
||||||
|
|
||||||
## vim-go: : packages.Load error
|
|
||||||
|
|
||||||
Type the commands bellow:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
go clean -cache
|
|
||||||
```
|
|
||||||
|
|
|
@ -22,6 +22,12 @@ vim.api.nvim_exec2
|
||||||
print(vim.inspect(table))
|
print(vim.inspect(table))
|
||||||
```
|
```
|
||||||
|
|
||||||
|
或者 `vim.print`,以可读的方式输打印参数,如:
|
||||||
|
|
||||||
|
```lua
|
||||||
|
vim.print(vim.fn.api_info())
|
||||||
|
```
|
||||||
|
|
||||||
```lua
|
```lua
|
||||||
-- execute system command
|
-- execute system command
|
||||||
local has_cmd = function(cmd)
|
local has_cmd = function(cmd)
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
-- Setup nvim-cmp.
|
-- Setup nvim-cmp.
|
||||||
local status_ok, npairs = pcall(require, "nvim-autopairs")
|
local status_ok, npairs = pcall(require, "nvim-autopairs")
|
||||||
if not status_ok then
|
if not status_ok then
|
||||||
|
vim.notify("nvim-autopairs load error")
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ end
|
||||||
|
|
||||||
local ok, luasnip = pcall(require, "luasnip")
|
local ok, luasnip = pcall(require, "luasnip")
|
||||||
if not ok then
|
if not ok then
|
||||||
print("luasnip load error")
|
vim.notify("luasnip load error")
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -6,17 +6,20 @@ end
|
||||||
ibl.update({
|
ibl.update({
|
||||||
exclude = {
|
exclude = {
|
||||||
filetypes = {
|
filetypes = {
|
||||||
'c',
|
"c",
|
||||||
'cpp',
|
"cc",
|
||||||
'h',
|
"cxx",
|
||||||
'hpp',
|
"cpp",
|
||||||
'java',
|
"h",
|
||||||
'json',
|
"hpp",
|
||||||
'json5',
|
"hxx",
|
||||||
'nu',
|
"java",
|
||||||
'go',
|
"json",
|
||||||
'rust',
|
"json5",
|
||||||
'xml',
|
"nu",
|
||||||
|
"go",
|
||||||
|
"rust",
|
||||||
|
"xml",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -29,8 +32,8 @@ ibl.update({
|
||||||
-- }
|
-- }
|
||||||
--
|
--
|
||||||
-- vim.g.indent_blankline_filetype = {
|
-- vim.g.indent_blankline_filetype = {
|
||||||
-- 'python',
|
-- "python",
|
||||||
-- 'lua',
|
-- "lua",
|
||||||
-- }
|
-- }
|
||||||
--
|
--
|
||||||
-- -- vim.g.indent_blankline_filetype_exclude = {
|
-- -- vim.g.indent_blankline_filetype_exclude = {
|
||||||
|
@ -39,8 +42,8 @@ ibl.update({
|
||||||
-- -- "help",
|
-- -- "help",
|
||||||
-- -- "man",
|
-- -- "man",
|
||||||
-- -- "neogitstatus",
|
-- -- "neogitstatus",
|
||||||
-- -- 'nerdtree',
|
-- -- "nerdtree",
|
||||||
-- -- 'vista',
|
-- -- "vista",
|
||||||
-- -- "startify",
|
-- -- "startify",
|
||||||
-- -- "packer",
|
-- -- "packer",
|
||||||
-- -- "NvimTree",
|
-- -- "NvimTree",
|
||||||
|
|
|
@ -7,7 +7,7 @@ local possible_pythons = {
|
||||||
'/opt/homebrew/bin/python3',
|
'/opt/homebrew/bin/python3',
|
||||||
}
|
}
|
||||||
|
|
||||||
for i, v in pairs(possible_pythons) do
|
for _, v in pairs(possible_pythons) do
|
||||||
if vim.fn.filereadable(v) == 1 then
|
if vim.fn.filereadable(v) == 1 then
|
||||||
vim.api.nvim_set_var('python3_host_prog', v)
|
vim.api.nvim_set_var('python3_host_prog', v)
|
||||||
break
|
break
|
||||||
|
@ -16,22 +16,3 @@ end
|
||||||
|
|
||||||
vim.api.nvim_set_var('python_highlight_all', 1)
|
vim.api.nvim_set_var('python_highlight_all', 1)
|
||||||
|
|
||||||
-- pymode settings
|
|
||||||
-- vim.g.pymode = 1
|
|
||||||
-- vim.g.pymode_trim_whitespaces = 1
|
|
||||||
-- vim.g.pymode_options_max_line_length = 120
|
|
||||||
-- vim.g.pymode_lint_options_pep8 = {max_line_length = vim.g.pymode_options_max_line_length}
|
|
||||||
--
|
|
||||||
-- vim.g.pymode_rope = 1
|
|
||||||
-- vim.g.pymode_rope_refix = '<C-c>'
|
|
||||||
-- vim.g.pymode_lint_cwindow = 0
|
|
||||||
--
|
|
||||||
-- -- set completeopt=menuone,noinsert
|
|
||||||
-- vim.api.nvim_set_var('completeopt', {'menuone', 'noinsert'})
|
|
||||||
-- vim.g.pymode_rope_completion = 1
|
|
||||||
-- vim.g.pymode_rope_complete_on_dot = 1
|
|
||||||
-- vim.g.pymode_rope_autoimport_modules = {'os', 'shutil', 'datetime'}
|
|
||||||
--
|
|
||||||
-- -- Find definition
|
|
||||||
-- vim.g.pymode_rope_goto_definition_bind = '<C-c>g'
|
|
||||||
-- vim.g.pymode_rope_goto_definition_cmd = 'new'
|
|
||||||
|
|
Loading…
Reference in New Issue