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))
|
||||
```
|
||||
|
||||
或者 `vim.print`,以可读的方式输打印参数,如:
|
||||
|
||||
```lua
|
||||
vim.print(vim.fn.api_info())
|
||||
```
|
||||
|
||||
```lua
|
||||
-- execute system command
|
||||
local has_cmd = function(cmd)
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
-- Setup nvim-cmp.
|
||||
local status_ok, npairs = pcall(require, "nvim-autopairs")
|
||||
if not status_ok then
|
||||
vim.notify("nvim-autopairs load error")
|
||||
return
|
||||
end
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ end
|
|||
|
||||
local ok, luasnip = pcall(require, "luasnip")
|
||||
if not ok then
|
||||
print("luasnip load error")
|
||||
vim.notify("luasnip load error")
|
||||
return
|
||||
end
|
||||
|
||||
|
|
|
@ -6,17 +6,20 @@ end
|
|||
ibl.update({
|
||||
exclude = {
|
||||
filetypes = {
|
||||
'c',
|
||||
'cpp',
|
||||
'h',
|
||||
'hpp',
|
||||
'java',
|
||||
'json',
|
||||
'json5',
|
||||
'nu',
|
||||
'go',
|
||||
'rust',
|
||||
'xml',
|
||||
"c",
|
||||
"cc",
|
||||
"cxx",
|
||||
"cpp",
|
||||
"h",
|
||||
"hpp",
|
||||
"hxx",
|
||||
"java",
|
||||
"json",
|
||||
"json5",
|
||||
"nu",
|
||||
"go",
|
||||
"rust",
|
||||
"xml",
|
||||
}
|
||||
}
|
||||
})
|
||||
|
@ -29,8 +32,8 @@ ibl.update({
|
|||
-- }
|
||||
--
|
||||
-- vim.g.indent_blankline_filetype = {
|
||||
-- 'python',
|
||||
-- 'lua',
|
||||
-- "python",
|
||||
-- "lua",
|
||||
-- }
|
||||
--
|
||||
-- -- vim.g.indent_blankline_filetype_exclude = {
|
||||
|
@ -39,8 +42,8 @@ ibl.update({
|
|||
-- -- "help",
|
||||
-- -- "man",
|
||||
-- -- "neogitstatus",
|
||||
-- -- 'nerdtree',
|
||||
-- -- 'vista',
|
||||
-- -- "nerdtree",
|
||||
-- -- "vista",
|
||||
-- -- "startify",
|
||||
-- -- "packer",
|
||||
-- -- "NvimTree",
|
||||
|
|
|
@ -7,7 +7,7 @@ local possible_pythons = {
|
|||
'/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
|
||||
vim.api.nvim_set_var('python3_host_prog', v)
|
||||
break
|
||||
|
@ -16,22 +16,3 @@ end
|
|||
|
||||
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