diff options
author | Franciszek Malinka <franciszek.malinka@gmail.com> | 2022-11-05 11:41:28 +0100 |
---|---|---|
committer | Franciszek Malinka <franciszek.malinka@gmail.com> | 2022-11-05 11:41:28 +0100 |
commit | 40d94e85bfd5ae422aa0b8b5ae147229896994f5 (patch) | |
tree | 3fa3db3209781799154bc94deea754f448028e0c | |
parent | a4b1a5a86e17ae745d5358dd6541998daf928d4b (diff) |
Added gitsigns; added shortcuts to change colorscheme
-rw-r--r-- | init.lua | 1 | ||||
-rw-r--r-- | lua/user/cmp.lua | 2 | ||||
-rw-r--r-- | lua/user/gitsigns.lua | 7 | ||||
-rw-r--r-- | lua/user/keymaps.lua | 4 | ||||
-rw-r--r-- | lua/user/lsp/handlers.lua | 2 | ||||
-rw-r--r-- | lua/user/plugins.lua | 3 |
6 files changed, 17 insertions, 2 deletions
@@ -15,6 +15,7 @@ require "user.alpha" require "user.session-manager" require "user.telescope" require "user.nvimtree" +require "user.gitsigns" -- Those should be called last require "user.keymaps" diff --git a/lua/user/cmp.lua b/lua/user/cmp.lua index b52f421..51eecfc 100644 --- a/lua/user/cmp.lua +++ b/lua/user/cmp.lua @@ -10,7 +10,7 @@ end require("luasnip/loaders/from_vscode").lazy_load() -local check_backspace = function() +local check_backspace = function() local col = vim.fn.col "." - 1 return col == 0 or vim.fn.getline("."):sub(col, col):match "%s" end diff --git a/lua/user/gitsigns.lua b/lua/user/gitsigns.lua new file mode 100644 index 0000000..2780a58 --- /dev/null +++ b/lua/user/gitsigns.lua @@ -0,0 +1,7 @@ +local status_ok, gitsigns = pcall(require, "gitsigns") +if not status_ok then + print "nvim-lsp-installer not opened correctly" + return +end + +gitsigns.setup({}) diff --git a/lua/user/keymaps.lua b/lua/user/keymaps.lua index c0291c9..e6fa25c 100644 --- a/lua/user/keymaps.lua +++ b/lua/user/keymaps.lua @@ -63,3 +63,7 @@ keymap("n", "<leader>so", "<cmd>SessionManager load_session<CR>", opts) -- Bbye keymap("n", "<leader>q", "<cmd>Bdelete<CR>", opts) + +-- Random +keymap("n", "<leader>b", ":colorscheme gruvbox<CR>:set background=light<CR>", opts) +keymap("n", "<leader>n", ":colorscheme darkplus<CR>:set background=daret background=light<CR>", opts) diff --git a/lua/user/lsp/handlers.lua b/lua/user/lsp/handlers.lua index 9b35d98..a5f78d7 100644 --- a/lua/user/lsp/handlers.lua +++ b/lua/user/lsp/handlers.lua @@ -83,6 +83,6 @@ if not status_ok then return end -M.capabilities = cmp_nvim_lsp.update_capabilities(capabilities) +M.capabilities = cmp_nvim_lsp.default_capabilities(capabilities) return M diff --git a/lua/user/plugins.lua b/lua/user/plugins.lua index c1c8e8c..2e363ec 100644 --- a/lua/user/plugins.lua +++ b/lua/user/plugins.lua @@ -88,6 +88,9 @@ return packer.startup(function(use) use "goolord/alpha-nvim" use "Shatur/neovim-session-manager" + + use "lewis6991/gitsigns.nvim" + if PACKER_BOOTSTRAP then require("packer").sync() end |