aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--init.lua1
-rw-r--r--lua/user/cmp.lua2
-rw-r--r--lua/user/gitsigns.lua7
-rw-r--r--lua/user/keymaps.lua4
-rw-r--r--lua/user/lsp/handlers.lua2
-rw-r--r--lua/user/plugins.lua3
6 files changed, 17 insertions, 2 deletions
diff --git a/init.lua b/init.lua
index f4d1433..fca96e9 100644
--- a/init.lua
+++ b/init.lua
@@ -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