-
-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
16da614
commit 78c8350
Showing
13 changed files
with
152 additions
and
132 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
vim.opt.textwidth = 0 | ||
vim.opt.wrapmargin=0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,30 @@ | ||
{ | ||
"Comment.nvim": { "branch": "master", "commit": "0236521ea582747b58869cb72f70ccfa967d2e89" }, | ||
"barbar.nvim": { "branch": "master", "commit": "4ba9ac54f0c5d82131905160afff94172e3325e6" }, | ||
"catppuccin": { "branch": "main", "commit": "079500a625f3ae5aa6efb758f1a17fe4c7a57e52" }, | ||
"barbar.nvim": { "branch": "master", "commit": "c3ab0dbfe143ffb89a245e5b530f5349d6bb64e1" }, | ||
"catppuccin": { "branch": "main", "commit": "c2034f7b549152e5cc757820426341ea5000bc7a" }, | ||
"cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" }, | ||
"cmp-nvim-ultisnips": { "branch": "main", "commit": "24bca5c3e137b28cd87442d4fc51a2b312dd99cc" }, | ||
"csv.vim": { "branch": "master", "commit": "962f88787ec6873eba1c7dbbd81d2723f1ee3c4b" }, | ||
"gitsigns.nvim": { "branch": "main", "commit": "d195f0c35ced5174d3ecce1c4c8ebb3b5bc23fa9" }, | ||
"lazy.nvim": { "branch": "main", "commit": "96584866b9c5e998cbae300594d0ccfd0c464627" }, | ||
"lspkind-nvim": { "branch": "master", "commit": "57610d5ab560c073c465d6faf0c19f200cb67e6e" }, | ||
"lualine.nvim": { "branch": "master", "commit": "2248ef254d0a1488a72041cfb45ca9caada6d994" }, | ||
"gitsigns.nvim": { "branch": "main", "commit": "2c2463dbd82eddd7dbab881c3a62cfbfbe3c67ae" }, | ||
"go.nvim": { "branch": "master", "commit": "24d2fa373d55d9900cd4b502a88214dc17e6fab6" }, | ||
"guihua.lua": { "branch": "master", "commit": "9fb6795474918b492d9ab01b1ebaf85e8bf6fe0b" }, | ||
"lazy.nvim": { "branch": "main", "commit": "aedcd79811d491b60d0a6577a9c1701063c2a609" }, | ||
"lsp_signature.nvim": { "branch": "master", "commit": "fed2c8389c148ff1dfdcdca63c2b48d08a50dea0" }, | ||
"lspkind-nvim": { "branch": "master", "commit": "1735dd5a5054c1fb7feaf8e8658dbab925f4f0cf" }, | ||
"lualine.nvim": { "branch": "master", "commit": "7d131a8d3ba5016229e8a1d08bf8782acea98852" }, | ||
"navigator.lua": { "branch": "master", "commit": "29d5f05bf9094cd0770018e19a27da81c247c503" }, | ||
"nvim-cmp": { "branch": "main", "commit": "538e37ba87284942c1d76ed38dd497e54e65b891" }, | ||
"nvim-lsp-installer": { "branch": "main", "commit": "17e0bfa5f2c8854d1636fcd036dc8284db136baa" }, | ||
"nvim-lspconfig": { "branch": "master", "commit": "e85816c5803410cacb52e9b4fbdb72a1f1a6bd11" }, | ||
"nvim-lspconfig": { "branch": "master", "commit": "1759ea68fbbb1303192020d3e59936189359e0ed" }, | ||
"nvim-lspconfig-bundler": { "branch": "main", "commit": "9a27ba348a639cc191d16a16102fcdc2c5c58b48" }, | ||
"nvim-surround": { "branch": "main", "commit": "633a0ab03159569a66b65671b0ffb1a6aed6cf18" }, | ||
"nvim-tree.lua": { "branch": "master", "commit": "50f30bcd8c62ac4a83d133d738f268279f2c2ce2" }, | ||
"nvim-treesitter": { "branch": "master", "commit": "0dfbf5e48e8551212c2a9f1c74cb080c8e76b5d1" }, | ||
"nvim-treesitter-textobjects": { "branch": "master", "commit": "ec1c5bdb3d87ac971749fa6c7dbc2b14884f1f6a" }, | ||
"nvim-web-devicons": { "branch": "master", "commit": "a1425903ab52a0a0460622519e827f224e5b4fee" }, | ||
"plenary.nvim": { "branch": "master", "commit": "55d9fe89e33efd26f532ef20223e5f9430c8b0c0" }, | ||
"nvim-surround": { "branch": "main", "commit": "703ec63aa798e5e07d309b35e42def34bebe0174" }, | ||
"nvim-tree.lua": { "branch": "master", "commit": "f39f7b6fcd3865ac2146de4cb4045286308f2935" }, | ||
"nvim-treesitter": { "branch": "master", "commit": "f197a15b0d1e8d555263af20add51450e5aaa1f0" }, | ||
"nvim-treesitter-textobjects": { "branch": "master", "commit": "19a91a38b02c1c28c14e0ba468d20ae1423c39b2" }, | ||
"nvim-web-devicons": { "branch": "master", "commit": "aaec87dbdaa776bfa0a13c8694bec9bcb7454719" }, | ||
"plenary.nvim": { "branch": "master", "commit": "4f71c0c4a196ceb656c824a70792f3df3ce6bb6d" }, | ||
"telescope-fzf-native.nvim": { "branch": "main", "commit": "6c921ca12321edaa773e324ef64ea301a1d0da62" }, | ||
"telescope.nvim": { "branch": "0.1.x", "commit": "d90956833d7c27e73c621a61f20b29fdb7122709" }, | ||
"ultisnips": { "branch": "master", "commit": "b393ba65386d47664421e1f8b246a87a6e8b218c" }, | ||
"vim-clang-format": { "branch": "master", "commit": "6b791825ff478061ad1c57b21bb1ed5a5fd0eb29" }, | ||
"vim-go": { "branch": "master", "commit": "e8c18054cc44973ee4f59ee463dda4bf6439713c" } | ||
"vim-clang-format": { "branch": "master", "commit": "6b791825ff478061ad1c57b21bb1ed5a5fd0eb29" } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
local setup, go = pcall(require, "go") | ||
if not setup then return end | ||
|
||
local lsp_setup, go_lsp = pcall(require, "go.lsp") | ||
if not lsp_setup then return end | ||
|
||
local lspconfig_setup, lspconfig = pcall(require, "lspconfig") | ||
if not lspconfig_setup then return end | ||
|
||
local lsp_signature_setup, lsp_signature = pcall(require, "lsp_signature") | ||
if not lsp_signature_setup then return end | ||
|
||
go.setup({ | ||
gofmt = "gofmt" | ||
-- run_in_floaterm = true, | ||
-- floaterm = { -- position | ||
-- posititon = 'auto', -- one of {`top`, `bottom`, `left`, `right`, `center`, `auto`} | ||
-- width = 0.45, -- width of float window if not auto | ||
-- height = 0.98, -- height of float window if not auto | ||
-- title_colors = 'nord', -- default to nord, one of {'nord', 'tokyo', 'dracula', 'rainbow', 'solarized ', 'monokai'} | ||
-- -- can also set to a list of colors to define colors to choose from | ||
-- -- e.g {'#D8DEE9', '#5E81AC', '#88C0D0', '#EBCB8B', '#A3BE8C', '#B48EAD'} | ||
-- }, | ||
}) | ||
|
||
lspconfig.gopls.setup(go_lsp.config()) | ||
|
||
vim.cmd("augroup go") | ||
vim.cmd("autocmd!") | ||
|
||
-- vim.cmd("autocmd FileType go nmap <leader>Gb :GoBuild %:.:h<CR>") | ||
vim.cmd("autocmd FileType go nmap <leader>Gb :GoBuild %:p:h<CR>") | ||
vim.cmd("autocmd FileType go nmap <leader>Gt :GoTestPkg<CR>") | ||
vim.cmd("autocmd FileType go nmap <leader>Gc :GoCoverage -p<CR>") | ||
|
||
-- vim.cmd("autocmd FileType go nmap <Leader>gc :lua require('go.comment').gen()") | ||
|
||
-- vim.fn.getcwd() | ||
|
||
-- vim.cmd("autocmd CursorHold <buffer> lua vim.lsp.buf.document_highlight()") | ||
-- | ||
|
||
vim.cmd( | ||
"autocmd BufWritePre (InsertLeave?) <buffer> lua vim.lsp.buf.formatting_sync(nil,500)") | ||
|
||
vim.cmd( | ||
"autocmd Filetype go command! -bang A :lua require('go.alternate').switch(true, '')") | ||
vim.cmd( | ||
"autocmd Filetype go command! -bang AV :lua require('go.alternate').switch(true, 'vsplit')") | ||
vim.cmd( | ||
"autocmd Filetype go command! -bang AS :lua require('go.alternate').switch(true, 'split')") | ||
|
||
vim.cmd("augroup END") | ||
|
||
-- { | ||
|
||
lsp_signature.setup({ | ||
auto_close_after = 1, | ||
handler_opts = { | ||
border = "rounded" -- double, rounded, single, shadow, none, or a table of borders | ||
}, | ||
floating_window = true, -- show hint in a floating window, set to false for virtual text only mode | ||
floating_window_off_x = 5, -- adjust float windows x position. | ||
floating_window_off_y = function() -- adjust float windows y position. e.g. set to -2 can make floating window move up 2 lines | ||
local linenr = vim.api.nvim_win_get_cursor(0)[1] -- buf line number | ||
local pumheight = vim.o.pumheight | ||
local winline = vim.fn.winline() -- line number in the window | ||
local winheight = vim.fn.winheight(0) | ||
|
||
-- window top | ||
if winline - 1 < pumheight then return pumheight end | ||
|
||
-- window bottom | ||
if winheight - winline < pumheight then return -pumheight end | ||
return 0 | ||
end | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
local setup, navigator = pcall(require, "navigator") | ||
if not setup then return end | ||
|
||
navigator.setup() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters