AutoYADM commit: 2024-12-31 20:45:02
This commit is contained in:
parent
96168d78b7
commit
59340e713d
3 changed files with 161 additions and 36 deletions
|
@ -16,7 +16,6 @@
|
||||||
"lazyvim.plugins.extras.lang.clangd",
|
"lazyvim.plugins.extras.lang.clangd",
|
||||||
"lazyvim.plugins.extras.lang.cmake",
|
"lazyvim.plugins.extras.lang.cmake",
|
||||||
"lazyvim.plugins.extras.lang.docker",
|
"lazyvim.plugins.extras.lang.docker",
|
||||||
"lazyvim.plugins.extras.lang.go",
|
|
||||||
"lazyvim.plugins.extras.lang.java",
|
"lazyvim.plugins.extras.lang.java",
|
||||||
"lazyvim.plugins.extras.lang.json",
|
"lazyvim.plugins.extras.lang.json",
|
||||||
"lazyvim.plugins.extras.lang.nushell",
|
"lazyvim.plugins.extras.lang.nushell",
|
||||||
|
|
126
.config/nvim/lua/plugins/go.lua
Normal file
126
.config/nvim/lua/plugins/go.lua
Normal file
|
@ -0,0 +1,126 @@
|
||||||
|
return {
|
||||||
|
{
|
||||||
|
"nvim-treesitter/nvim-treesitter",
|
||||||
|
opts = { ensure_installed = { "go", "gomod", "gowork", "gosum" } },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"neovim/nvim-lspconfig",
|
||||||
|
opts = {
|
||||||
|
servers = {
|
||||||
|
gopls = {
|
||||||
|
settings = {
|
||||||
|
gopls = {
|
||||||
|
gofumpt = true,
|
||||||
|
codelenses = {
|
||||||
|
gc_details = false,
|
||||||
|
generate = true,
|
||||||
|
regenerate_cgo = true,
|
||||||
|
run_govulncheck = true,
|
||||||
|
test = true,
|
||||||
|
tidy = true,
|
||||||
|
upgrade_dependency = true,
|
||||||
|
vendor = true,
|
||||||
|
},
|
||||||
|
hints = {
|
||||||
|
assignVariableTypes = true,
|
||||||
|
compositeLiteralFields = true,
|
||||||
|
compositeLiteralTypes = true,
|
||||||
|
constantValues = true,
|
||||||
|
functionTypeParameters = true,
|
||||||
|
parameterNames = true,
|
||||||
|
rangeVariableTypes = true,
|
||||||
|
},
|
||||||
|
analyses = {
|
||||||
|
fieldalignment = true,
|
||||||
|
nilness = true,
|
||||||
|
unusedparams = true,
|
||||||
|
unusedwrite = true,
|
||||||
|
useany = true,
|
||||||
|
},
|
||||||
|
usePlaceholders = true,
|
||||||
|
completeUnimported = true,
|
||||||
|
staticcheck = true,
|
||||||
|
directoryFilters = { "-.git", "-.vscode", "-.idea", "-.vscode-test", "-node_modules" },
|
||||||
|
semanticTokens = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
setup = {
|
||||||
|
gopls = function(_, opts)
|
||||||
|
-- workaround for gopls not supporting semanticTokensProvider
|
||||||
|
-- https://github.com/golang/go/issues/54531#issuecomment-1464982242
|
||||||
|
LazyVim.lsp.on_attach(function(client, _)
|
||||||
|
if not client.server_capabilities.semanticTokensProvider then
|
||||||
|
local semantic = client.config.capabilities.textDocument.semanticTokens
|
||||||
|
client.server_capabilities.semanticTokensProvider = {
|
||||||
|
full = true,
|
||||||
|
legend = {
|
||||||
|
tokenTypes = semantic.tokenTypes,
|
||||||
|
tokenModifiers = semantic.tokenModifiers,
|
||||||
|
},
|
||||||
|
range = true,
|
||||||
|
}
|
||||||
|
end
|
||||||
|
end, "gopls")
|
||||||
|
-- end workaround
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"williamboman/mason.nvim",
|
||||||
|
opts = { ensure_installed = { "goimports", "gofumpt", "gomodifytags", "impl" } },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fredrikaverpil/neotest-golang",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"echasnovski/mini.icons",
|
||||||
|
opts = {
|
||||||
|
file = {
|
||||||
|
[".go-version"] = { glyph = "", hl = "MiniIconsBlue" },
|
||||||
|
},
|
||||||
|
filetype = {
|
||||||
|
gotmpl = { glyph = "", hl = "MiniIconsGrey" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"stevearc/conform.nvim",
|
||||||
|
optional = true,
|
||||||
|
opts = {
|
||||||
|
formatters_by_ft = {
|
||||||
|
go = { "goimports", "gofumpt" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"mfussenegger/nvim-dap",
|
||||||
|
dependencies = {
|
||||||
|
{
|
||||||
|
"williamboman/mason.nvim",
|
||||||
|
opts = { ensure_installed = { "delve" } },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"leoluz/nvim-dap-go",
|
||||||
|
opts = {},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"nvim-neotest/neotest",
|
||||||
|
dependencies = {
|
||||||
|
"fredrikaverpil/neotest-golang",
|
||||||
|
},
|
||||||
|
opts = {
|
||||||
|
adapters = {
|
||||||
|
["neotest-golang"] = {
|
||||||
|
-- Here we can set options for neotest-golang, e.g.
|
||||||
|
-- go_test_args = { "-v", "-race", "-count=1", "-timeout=60s" },
|
||||||
|
dap_go_enabled = true, -- requires leoluz/nvim-dap-go
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
|
@ -50,46 +50,46 @@ set -g bell-action none
|
||||||
### PLUGINS
|
### PLUGINS
|
||||||
|
|
||||||
# plugin manager
|
# plugin manager
|
||||||
# set -g @plugin 'tmux-plugins/tpm'
|
set -g @plugin 'tmux-plugins/tpm'
|
||||||
# sensible defaults
|
# sensible defaults
|
||||||
# set -g @plugin 'tmux-plugins/tmux-sensible'
|
set -g @plugin 'tmux-plugins/tmux-sensible'
|
||||||
# better yank
|
# better yank
|
||||||
# set -g @plugin 'tmux-plugins/tmux-yank'
|
set -g @plugin 'tmux-plugins/tmux-yank'
|
||||||
# pretty minimal status
|
# pretty minimal status
|
||||||
# set -g @plugin 'niksingh710/minimal-tmux-status'
|
set -g @plugin 'niksingh710/minimal-tmux-status'
|
||||||
|
|
||||||
# Theme Settings
|
# Theme Settings
|
||||||
# set -g @minimal-tmux-use-arrow false
|
set -g @minimal-tmux-use-arrow false
|
||||||
# set -g @minimal-tmux-status "top"
|
set -g @minimal-tmux-status "top"
|
||||||
# set -g @minimal-tmux-right true
|
set -g @minimal-tmux-right true
|
||||||
# set -g @minimal-tmux-justify "centre"
|
set -g @minimal-tmux-justify "centre"
|
||||||
# set -g @minimal-tmux-bg "#933737"
|
set -g @minimal-tmux-bg "#933737"
|
||||||
# set -g @minimal-tmux-fg "#000000"
|
set -g @minimal-tmux-fg "#000000"
|
||||||
#
|
|
||||||
# set -g @plugin 'tmux-plugins/tmux-resurrect'
|
|
||||||
# set -g @resurrect-strategy-nvim 'session'
|
|
||||||
# set -g @plugin 'tmux-plugins/tmux-continuum'
|
|
||||||
# set -g @continuum-boot 'on'
|
|
||||||
|
|
||||||
# # Awesome Tmux
|
set -g @plugin 'tmux-plugins/tmux-resurrect'
|
||||||
# # note: prefix + Tab to trigger
|
set -g @resurrect-strategy-nvim 'session'
|
||||||
# set -g @plugin 'laktak/extrakto'
|
set -g @plugin 'tmux-plugins/tmux-continuum'
|
||||||
# # prefix + ?: keybindings help
|
set -g @continuum-boot 'on'
|
||||||
# set -g @plugin 'lost-melody/tmux-command-palette'
|
|
||||||
# # easymotion
|
# Awesome Tmux
|
||||||
# set -g @plugin 'ddzero2c/tmux-easymotion'
|
# note: prefix + Tab to trigger
|
||||||
# set -g @easymotion-key 's'
|
set -g @plugin 'laktak/extrakto'
|
||||||
#
|
# prefix + ?: keybindings help
|
||||||
# # prefix + T
|
set -g @plugin 'lost-melody/tmux-command-palette'
|
||||||
# set -g @plugin '27medkamal/tmux-session-wizard'
|
# easymotion
|
||||||
# # prefix + g
|
set -g @plugin 'ddzero2c/tmux-easymotion'
|
||||||
# set -g @plugin 'sturob/tmux-teleport'
|
set -g @easymotion-key 's'
|
||||||
#
|
|
||||||
# # Prefix f to open main fzf
|
# prefix + T
|
||||||
# # Prefix C-w to open window switcher
|
set -g @plugin '27medkamal/tmux-session-wizard'
|
||||||
# TMUX_FZF_LAUNCH_KEY="C-f"
|
# prefix + g
|
||||||
# set -g @plugin 'sainnhe/tmux-fzf'
|
set -g @plugin 'sturob/tmux-teleport'
|
||||||
# bind-key C-w run-shell -b "/home/fic/.config/tmux/plugins/tmux-fzf/scripts/window.sh switch"
|
|
||||||
|
# Prefix f to open main fzf
|
||||||
|
# Prefix C-w to open window switcher
|
||||||
|
TMUX_FZF_LAUNCH_KEY="C-f"
|
||||||
|
set -g @plugin 'sainnhe/tmux-fzf'
|
||||||
|
bind-key C-w run-shell -b "/home/fic/.config/tmux/plugins/tmux-fzf/scripts/window.sh switch"
|
||||||
|
|
||||||
# TODO:
|
# TODO:
|
||||||
# https://github.com/whame/tmux-modal
|
# https://github.com/whame/tmux-modal
|
||||||
|
@ -176,4 +176,4 @@ bind c new-window -c ""
|
||||||
|
|
||||||
|
|
||||||
# WARN: This line must come last!
|
# WARN: This line must come last!
|
||||||
# run '/usr/share/tmux-plugin-manager/tpm'
|
run '~/.tmux/plugins/tpm/tpm'
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue