From 9953fa644c7f0d43be4b7cbf9a0154f11f55db52 Mon Sep 17 00:00:00 2001 From: Wil Simpson Date: Mon, 13 Mar 2023 15:13:29 -0400 Subject: [PATCH] tree picker and go --- init.lua | 10 ++++++++-- lua/custom/plugins/go.lua | 12 ++++++++++++ lua/custom/plugins/tree-picker.lua | 7 +++++++ 3 files changed, 27 insertions(+), 2 deletions(-) create mode 100644 lua/custom/plugins/go.lua create mode 100644 lua/custom/plugins/tree-picker.lua diff --git a/init.lua b/init.lua index 71136f70..2f3cd14b 100644 --- a/init.lua +++ b/init.lua @@ -203,7 +203,7 @@ vim.o.mouse = 'a' -- Sync clipboard between OS and Neovim. -- Remove this option if you want your OS clipboard to remain independent. -- See `:help 'clipboard'` -vim.o.clipboard = 'unnamedplus' +-- vim.o.clipboard = 'unnamedplus' -- Enable break indent vim.o.breakindent = true @@ -233,9 +233,15 @@ vim.o.termguicolors = true vim.o.relativenumber = true vim.o.number = true +-- Set scroll offsets to have additional space when scrolling vim.o.scrolloff = 5 vim.o.sidescrolloff = 10 +-- Set tabs to 2 spaces +vim.o.tabstop = 2 +vim.o.softtabstop = 2 +vim.o.shiftwidth = 2 + -- [[ Basic Keymaps ]] -- Keymaps for better default experience @@ -406,7 +412,7 @@ local on_attach = function(_, bufnr) vim.lsp.buf.format() end, { desc = 'Format current buffer with LSP' }) - nmap('f', function() vim.lsp.buf.format { async = true } end, 'Auto [F]ormat') + nmap('', function() vim.lsp.buf.format { async = true } end, 'Auto [F]ormat') end -- Enable the following language servers diff --git a/lua/custom/plugins/go.lua b/lua/custom/plugins/go.lua new file mode 100644 index 00000000..d1311436 --- /dev/null +++ b/lua/custom/plugins/go.lua @@ -0,0 +1,12 @@ +return { + 'ray-x/go.nvim', + requires = { + 'ray-x/guihua.lua' + }, + config = function() + require("go").setup() + end, + event = { 'CmdlineEnter' }, + ft = { 'go', 'gomod' }, + build = ':lua require("go.install").update_all_sync()', +} diff --git a/lua/custom/plugins/tree-picker.lua b/lua/custom/plugins/tree-picker.lua new file mode 100644 index 00000000..1d56d358 --- /dev/null +++ b/lua/custom/plugins/tree-picker.lua @@ -0,0 +1,7 @@ +return { + 's1n7ax/nvim-window-picker', + version = "*", + config = function() + require('window-picker').setup() + end +}