-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.lua
667 lines (639 loc) · 21.8 KB
/
init.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
vim.wo.number = true
vim.cmd("set fileformat=unix")
vim.o.clipboard = "unnamedplus"
-- Change leader to a comma
vim.g.mapleader = "\\"
vim.api.nvim_set_keymap('i', 'jj', '<Esc>', { noremap = true, silent = true })
vim.api.nvim_set_keymap('n', 'Q', ':!!sh<CR>', { noremap = true, silent = true })
vim.keymap.set('n', '<C-y>', ':let @+ = expand("%:p")<CR>')
vim.keymap.set('n', "<left>", "gT")
vim.keymap.set('n', "<right>", "gt")
vim.keymap.set('n', "<C-c>", ":q<CR>")
vim.keymap.set('n', "<leader>re", ":tabnew ~/.config/nvim/init.lua<CR>")
vim.keymap.set('n', "<leader>rr", ":source $MYVIMRC<CR>")
vim.keymap.set('n', "<C-s>", ':w<CR>')
vim.keymap.set('i', "<C-s>", '<Esc>:w<CR>a')
--
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
"--branch=stable", -- latest stable release
lazypath,
})
end
vim.opt.rtp:prepend(lazypath)
plugins = {
{
'numToStr/Comment.nvim',
opts = {
-- add any options here
},
lazy = false,
},
'neovim/nvim-lspconfig',
"williamboman/mason-lspconfig.nvim",
"williamboman/mason.nvim",
{ "rcarriga/nvim-dap-ui", dependencies = { "mfussenegger/nvim-dap", "nvim-neotest/nvim-nio" } },
"mfussenegger/nvim-dap",
"leoluz/nvim-dap-go",
"jay-babu/mason-nvim-dap.nvim",
"elentok/format-on-save.nvim",
"pmizio/typescript-tools.nvim",
"David-Kunz/jester",
"klen/nvim-test",
{
'nvim-lualine/lualine.nvim',
dependencies = { 'nvim-tree/nvim-web-devicons' }
},
"ruifm/gitlinker.nvim",
{
"roobert/action-hints.nvim",
config = function()
require("lualine").setup({
sections = {
lualine_x = { require("action-hints").statusline },
},
})
end,
},
{
"kylechui/nvim-surround",
version = "*", -- Use for stability; omit to use `main` branch for the latest features
event = "VeryLazy",
config = function()
require("nvim-surround").setup({
-- Configuration here, or leave empty to use defaults
})
end
},
{
"amitds1997/remote-nvim.nvim",
version = "*", -- Pin to GitHub releases
dependencies = {
"nvim-lua/plenary.nvim", -- For standard functions
"MunifTanjim/nui.nvim", -- To build the plugin UI
"nvim-telescope/telescope.nvim", -- For picking b/w different remote methods
},
config = true,
},
{
'nvim-treesitter/nvim-treesitter',
build = ':TSUpdate',
config = function()
local configs = require("nvim-treesitter.configs")
configs.setup({
ensure_installed = { "jsonc", "markdown", "lua",
"vim", "vimdoc", "query", "go", "typescript", "javascript", "html"
},
sync_install = false,
highlight = { enable = true },
indent = { enable = true },
refactor = {
smart_rename = {
enable = true,
-- Assign keymaps to false to disable them, e.g. `smart_rename = false`.
keymaps = {
smart_rename = "grr",
},
},
highlight_definitions = {
enable = true,
-- Set to false if you have an `updatetime` of ~100.
clear_on_cursor_move = true,
},
highlight_current_scope = { enable = false },
},
textobjects = {
move = {
enable = true,
set_jumps = true, -- whether to set jumps in the jumplist
goto_next_start = {
["]m"] = "@function.outer",
["]]"] = { query = "@class.outer", desc = "Next class start" },
--
-- You can use regex matching (i.e. lua pattern) and/or pass a list in a "query" key to group multiple queries.
["]o"] = "@loop.*",
-- ["]o"] = { query = { "@loop.inner", "@loop.outer" } }
--
-- You can pass a query group to use query from `queries/<lang>/<query_group>.scm file in your runtime path.
-- Below example nvim-treesitter's `locals.scm` and `folds.scm`. They also provide highlights.scm and indent.scm.
["]s"] = { query = "@local.scope", query_group = "locals", desc = "Next scope" },
["]z"] = { query = "@fold", query_group = "folds", desc = "Next fold" },
},
goto_next_end = {
["]M"] = "@function.outer",
["]["] = "@class.outer",
},
goto_previous_start = {
["[m"] = "@function.outer",
["[["] = "@class.outer",
},
goto_previous_end = {
["[M"] = "@function.outer",
["[]"] = "@class.outer",
},
-- Below will go to either the start or the end, whichever is closer.
-- Use if you want more granular movements
-- Make it even more gradual by adding multiple queries and regex.
goto_next = {
["]d"] = "@conditional.outer",
},
goto_previous = {
["[d"] = "@conditional.outer",
}
},
select = {
enable = true,
-- Automatically jump forward to textobj, similar to targets.vim
lookahead = true,
keymaps = {
-- You can use the capture groups defined in textobjects.scm
["af"] = "@function.outer",
["if"] = "@function.inner",
["ac"] = "@class.outer",
-- You can optionally set descriptions to the mappings (used in the desc parameter of
-- nvim_buf_set_keymap) which plugins like which-key display
["ic"] = { query = "@class.inner", desc = "Select inner part of a class region" },
-- You can also use captures from other query groups like `locals.scm`
["as"] = { query = "@scope", query_group = "locals", desc = "Select language scope" },
},
-- You can choose the select mode (default is charwise 'v')
--
-- Can also be a function which gets passed a table with the keys
-- * query_string: eg '@function.inner'
-- * method: eg 'v' or 'o'
-- and should return the mode ('v', 'V', or '<c-v>') or a table
-- mapping query_strings to modes.
selection_modes = {
['@parameter.outer'] = 'v', -- charwise
['@function.outer'] = 'V', -- linewise
['@class.outer'] = '<c-v>', -- blockwise
},
-- If you set this to `true` (default is `false`) then any textobject is
-- extended to include preceding or succeeding whitespace. Succeeding
-- whitespace has priority in order to act similarly to eg the built-in
-- `ap`.
--
-- Can also be a function which gets passed a table with the keys
-- * query_string: eg '@function.inner'
-- * selection_mode: eg 'v'
-- and should return true or false
include_surrounding_whitespace = true,
},
},
})
end
},
'nvim-treesitter/nvim-treesitter-refactor',
'nvim-treesitter/nvim-treesitter-textobjects',
{ "lukas-reineke/indent-blankline.nvim", main = "ibl", opts = {} },
'github/copilot.vim',
--'hrsh7th/cmp-nvim-lsp',
"ellisonleao/gruvbox.nvim",
"prichrd/refgo.nvim",
{ 'glacambre/firenvim', build = ":call firenvim#install(0)" },
"christoomey/vim-tmux-navigator",
"f-person/auto-dark-mode.nvim",
"nanotee/zoxide.vim",
'vladdoster/remember.nvim',
'lewis6991/gitsigns.nvim',
"ray-x/go.nvim",
"nvim-tree/nvim-web-devicons",
"sindrets/diffview.nvim",
"gpanders/editorconfig.nvim",
"rbgrouleff/bclose.vim",
"mikavilpas/yazi.nvim",
{
"oskarrrrrrr/symbols.nvim",
config = function()
local r = require("symbols.recipes")
require("symbols").setup(r.DefaultFilters, r.AsciiSymbols, {
-- custom settings here
-- e.g. hide_cursor = false
})
vim.keymap.set("n", ",s", "<cmd> Symbols<CR>")
vim.keymap.set("n", ",S", "<cmd> SymbolsClose<CR>")
end
},
"andymass/vim-matchup",
{ 'akinsho/git-conflict.nvim', version = "*", config = true },
"nat-418/boole.nvim",
{
"johmsalas/text-case.nvim",
dependencies = { "nvim-telescope/telescope.nvim" },
config = function()
require("textcase").setup({})
require("telescope").load_extension("textcase")
end,
keys = {
"ga", -- Default invocation prefix
{ "<C-x><C-c>", "<cmd>TextCaseOpenTelescope<CR>", mode = { "n", "x" }, desc = "Telescope" },
"ga", -- Default invocation prefix
{ "ga.", "<cmd>TextCaseOpenTelescope<CR>", mode = { "n", "x" }, desc = "Telescope" },
},
cmd = {
-- NOTE: The Subs command name can be customized via the option "substitude_command_name"
"Subs",
"TextCaseOpenTelescope",
"TextCaseOpenTelescopeQuickChange",
"TextCaseOpenTelescopeLSPChange",
"TextCaseStartReplacingCommand",
},
-- If you want to use the interactive feature of the `Subs` command right away, text-case.nvim
-- has to be loaded on startup. Otherwise, the interactive feature of the `Subs` will only be
-- available after the first executing of it or after a keymap of text-case.nvim has been used.
lazy = false,
},
"LunarVim/bigfile.nvim",
{
"CopilotC-Nvim/CopilotChat.nvim",
branch = "main",
dependencies = {
{ "github/copilot.vim" }, -- or github/copilot.vim
{ "nvim-lua/plenary.nvim" }, -- for curl, log wrapper
},
build = "make tiktoken", -- Only on MacOS or Linux
opts = {
-- See Configuration section for rest
},
-- See Commands section for default commands if you want to lazy load on them
},
"junegunn/fzf.vim",
{
'nvim-telescope/telescope.nvim',
tag = '0.1.5',
dependencies = {
'nvim-lua/plenary.nvim',
{
'nvim-telescope/telescope-live-grep-args.nvim',
version = "^1.0.0",
}
},
config = function()
local telescope = require("telescope")
-- first setup telescope
telescope.setup({
-- your config
})
-- then load the extension
telescope.load_extension("live_grep_args")
end
},
{
'chomosuke/term-edit.nvim',
lazy = false,
version = '1.*',
},
"ldelossa/gh.nvim",
dependencies = {
{
"ldelossa/litee.nvim",
config = function()
require("litee.lib").setup()
end,
},
},
config = function()
require("litee.gh").setup()
end,
'jeffkreeftmeijer/neovim-sensible',
{
"kiyoon/jupynium.nvim",
build = "pip3 install --user .",
-- build = "conda run --no-capture-output -n jupynium pip install .",
-- enabled = vim.fn.isdirectory(vim.fn.expand "~/miniconda3/envs/jupynium"),
},
"rcarriga/nvim-notify", -- optional
"stevearc/dressing.nvim" -- optional, UI for :JupyniumKernelSelect
}
require("lazy").setup(plugins, {})
require("gitlinker").setup()
require('boole').setup({
mappings = {
increment = '<C-a>',
decrement = '<C-x>'
},
-- User defined loops
additions = {
{ 'Foo', 'Bar' },
{ 'tic', 'tac', 'toe' }
},
allow_caps_additions = {
{ 'enable', 'disable' }
-- enable → disable
-- Enable → Disable
-- ENABLE → DISABLE
}
})
require("lspconfig").pylsp.setup {}
require("mason").setup()
require("mason-lspconfig").setup(
{ ensure_installed = { "ts_ls" } }
)
local lspconfig = require('lspconfig')
require('mason-lspconfig').setup_handlers({
function(server)
lspconfig[server].setup({
})
end,
})
lspconfig.ts_ls.setup({
on_attach = function(client, bufnr)
-- Additional on_attach settings can go here
end,
init_options = {
maxTsServerMemory = 16192,
}
})
require("mason-nvim-dap").setup()
require("jester").setup({
dap = {
console = "externalTerminal"
}
})
ssh_con = os.getenv("SSH_CONNECTION")
if not ssh_con or string.len(ssh_con) == 0 then
require("auto-dark-mode").setup()
end
require('nvim-test').setup()
require 'term-edit'.setup {
prompt_end = '➜ '
}
require("ibl").setup()
require("CopilotChat").setup {
debug = true, -- Enable debugging
-- See Configuration section for rest
}
-- Setup language servers.
local capabilities = vim.lsp.protocol.make_client_capabilities()
--capabilities = require('cmp_nvim_lsp').default_capabilities(capabilities)
local lspconfig = require('lspconfig')
-- Enable some language servers with the additional completion capabilities offered by nvim-cmp
local servers = { 'pyright', 'gopls' }
for _, lsp in ipairs(servers) do
lspconfig[lsp].setup {
-- on_attach = my_custom_on_attach,
capabilities = capabilities,
}
end
lspconfig.pyright.setup {}
lspconfig.rust_analyzer.setup {
-- Server-specific settings. See `:help lspconfig-setup`
settings = {
['rust-analyzer'] = {},
},
}
vim.cmd([[set foldmethod=syntax]])
vim.cmd([[colorscheme gruvbox]])
-- todo move mappings into a separate file
vim.keymap.set('n', '<leader>rr', ':source $MYVIMRC<CR>')
vim.keymap.set('n', '<leader>re', ':tabnew ~/.config/nvim/init.lua<CR>')
-- git setup {{{
require('gitsigns').setup {
signs = {
add = { text = '┃' },
change = { text = '┃' },
delete = { text = '_' },
topdelete = { text = '‾' },
changedelete = { text = '~' },
untracked = { text = '┆' },
},
signs_staged = {
add = { text = '┃' },
change = { text = '┃' },
delete = { text = '_' },
topdelete = { text = '‾' },
changedelete = { text = '~' },
untracked = { text = '┆' },
},
signs_staged_enable = true,
signcolumn = true, -- Toggle with `:Gitsigns toggle_signs`
numhl = false, -- Toggle with `:Gitsigns toggle_numhl`
linehl = false, -- Toggle with `:Gitsigns toggle_linehl`
word_diff = false, -- Toggle with `:Gitsigns toggle_word_diff`
watch_gitdir = {
follow_files = true
},
auto_attach = true,
attach_to_untracked = false,
current_line_blame = false, -- Toggle with `:Gitsigns toggle_current_line_blame`
current_line_blame_opts = {
virt_text = true,
virt_text_pos = 'eol', -- 'eol' | 'overlay' | 'right_align'
delay = 1000,
ignore_whitespace = false,
virt_text_priority = 100,
use_focus = true,
},
current_line_blame_formatter = '<author>, <author_time:%R> - <summary>',
sign_priority = 6,
update_debounce = 100,
status_formatter = nil, -- Use default
max_file_length = 40000, -- Disable if file is longer than this (in lines)
preview_config = {
-- Options passed to nvim_open_win
border = 'single',
style = 'minimal',
relative = 'cursor',
row = 0,
col = 1
},
on_attach = function(bufnr)
local gitsigns = require('gitsigns')
local function map(mode, l, r, opts)
opts = opts or {}
opts.buffer = bufnr
vim.keymap.set(mode, l, r, opts)
end
-- Navigation
map('n', 'gn', function()
if vim.wo.diff then
vim.cmd.normal({ ']c', bang = true })
else
gitsigns.nav_hunk('next')
end
end)
map('n', 'gp', function()
if vim.wo.diff then
vim.cmd.normal({ '[c', bang = true })
else
gitsigns.nav_hunk('prev')
end
end)
-- Actions
map('n', 'gs', gitsigns.stage_hunk)
map('n', 'gu', gitsigns.reset_hunk)
map('v', '<leader>hs', function()
gitsigns.stage_hunk({ vim.fn.line('.'), vim.fn.line('v') })
end)
map('v', 'gu', function()
gitsigns.reset_hunk({ vim.fn.line('.'), vim.fn.line('v') })
end)
map('n', 'gS', gitsigns.stage_buffer)
map('n', 'gSR', gitsigns.reset_buffer)
map('n', '<leader>hp', gitsigns.preview_hunk)
map('n', '<leader>hi', gitsigns.preview_hunk_inline)
map('n', '<leader>gb', function()
gitsigns.blame_line({ full = true })
end)
map('n', '<leader>hd', gitsigns.diffthis)
map('n', '<leader>hD', function()
gitsigns.diffthis('~')
end)
map('n', '<leader>hQ', function() gitsigns.setqflist('all') end)
map('n', '<leader>hq', gitsigns.setqflist)
-- Toggles
map('n', '<leader>tb', gitsigns.toggle_current_line_blame)
map('n', '<leader>td', gitsigns.toggle_deleted)
map('n', '<leader>tw', gitsigns.toggle_word_diff)
-- Text object
map({ 'o', 'x' }, 'ih', gitsigns.select_hunk)
end
}
--- }}}
--- telescope setup {{{
local telescope = require("telescope")
local lga_actions = require("telescope-live-grep-args.actions")
local builtin = require('telescope.builtin')
local actions = require("telescope.actions")
require("telescope").setup {
defaults = {
mappings = {
i = {
["<C-u>"] = false
},
},
},
extensions = {
live_grep_args = {
auto_quoting = true, -- enable/disable auto-quoting
-- define mappings, e.g.
mappings = { -- extend mappings
i = {
["<C-k>"] = lga_actions.quote_prompt(),
["<C-i>"] = lga_actions.quote_prompt({ postfix = " --iglob " }),
-- freeze the current list and start a fuzzy search in the frozen list
["<C-space>"] = actions.to_fuzzy_refine,
},
},
-- ... also accepts theme settings, for example:
-- theme = "dropdown", -- use dropdown theme
-- theme = { }, -- use own theme spec
-- layout_config = { mirror=true }, -- mirror preview pane
}
}
}
telescope.load_extension("live_grep_args")
-- }}}
vim.keymap.set('n', '<leader>ff', builtin.find_files)
vim.keymap.set('n', '<leader>fg', builtin.live_grep, {})
vim.keymap.set("n", "<leader>fa", ":lua require('telescope').extensions.live_grep_args.live_grep_args()<CR>")
vim.keymap.set('n', '<leader>fb', builtin.buffers, {})
vim.keymap.set('n', '<leader>fh', builtin.help_tags, {})
-- Global mappings.
-- See `:help vim.diagnostic.*` for documentation on any of the below functions
vim.keymap.set('n', "<leader>e", vim.diagnostic.open_float)
vim.keymap.set('n', '<leader>dk', vim.diagnostic.goto_prev)
vim.keymap.set('n', '<leader>dj', vim.diagnostic.goto_next)
vim.keymap.set('n', "<leader>q", vim.diagnostic.setloclist)
--'go.nvim setup'
require('go').setup()
--below is broken rn
--require("go.format").goimports() -- goimports + gofmt
---- Run gofmt + goimports on save
--local format_sync_grp = vim.api.nvim_create_augroup("goimports", {})
--vim.api.nvim_create_autocmd("BufWritePre", {
-- pattern = "*.go",
-- callback = function()
-- require('go.format').goimports()
-- end,
-- group = format_sync_grp,
--})
-- Use LspAttach autocommand to only map the following keys
-- after the language server attaches to the current buffer
vim.api.nvim_create_autocmd('LspAttach', {
group = vim.api.nvim_create_augroup('UserLspConfig', {}),
callback = function(ev)
-- Enable completion triggered by <c-x><c-o>
vim.bo[ev.buf].omnifunc = 'v:lua.vim.lsp.omnifunc'
-- Buffer local mappings.
-- See `:help vim.lsp.*` for documentation on any of the below functions
local opts = { buffer = ev.buf }
vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, opts)
vim.keymap.set('n', 'gd', vim.lsp.buf.definition, opts)
vim.keymap.set('n', 'K', vim.lsp.buf.hover, opts)
vim.keymap.set('n', 'gi', vim.lsp.buf.implementation, opts)
vim.keymap.set('n', 'K', vim.lsp.buf.signature_help, opts)
vim.keymap.set('n', "<leader>wa", vim.lsp.buf.add_workspace_folder, opts)
vim.keymap.set('n', "<leader>wr", vim.lsp.buf.remove_workspace_folder, opts)
vim.keymap.set("n", "<leader>gt", "<cmd>tab split | lua vim.lsp.buf.definition()<CR>", {})
vim.keymap.set('n', "<leader>wl", function()
print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
end, opts)
vim.keymap.set('n', "<leader>D", vim.lsp.buf.type_definition, opts)
vim.keymap.set('n', "<leader>rn", vim.lsp.buf.rename, opts)
vim.keymap.set({ 'n', 'v' }, "<leader>ca", vim.lsp.buf.code_action, opts)
vim.keymap.set('n', 'gr', vim.lsp.buf.references, opts)
vim.keymap.set('n', "<C-x>f", ':GoTestFunc<CR>', opts)
vim.keymap.set('n', '<leader>f', function()
vim.lsp.buf.format { async = true }
end, opts)
end,
})
require('remember')
local formatters = require("format-on-save.formatters")
require('format-on-save').setup({
experiments = {
partial_update = 'diff', -- or 'line-by-line'
},
formatter_by_ft = {
css = formatters.lsp,
html = formatters.lsp,
java = formatters.lsp,
javascript = formatters.lsp,
json = formatters.lsp,
lua = formatters.lsp,
markdown = formatters.prettierd,
openscad = formatters.lsp,
python = formatters.black,
rust = formatters.lsp,
scad = formatters.lsp,
scss = formatters.lsp,
sh = formatters.shfmt,
terraform = formatters.lsp,
typescript = formatters.prettierd,
typescriptreact = formatters.prettierd,
yaml = formatters.lsp,
golang = formatters.lsp,
}
})
vim.keymap.set('n', "<leader>ga", ':GoDebug -a<CR>')
vim.keymap.set('n', "<leader>bb", ':GoBreakToggle<CR>')
vim.cmd([[colorscheme gruvbox]])
-- cool if this works
if ssh_con and string.len(ssh_con) > 0 then
if vim.fn.executable("pbcopy") == 0 then
print("pbcopy not found, clipboard integration won't work")
else
vim.g.clipboard = {
name = "hackers_clipboard",
copy = {
["+"] = 'pbcopy',
["*"] = 'pbcopy',
},
paste = {
["+"] = (function()
return vim.fn.systemlist('pbpaste|sed -e "s/\r$//"', { '' }, 1) -- '1' keeps empty lines
end),
["*"] = (function()
return vim.fn.systemlist('pbpaste|sed -e "s/\r$//"', { '' }, 1)
end),
},
cache_enabled = true
}
end
end