nvim: some fixes to configs. Fixed some first time rum errors

This commit is contained in:
Sagi Dayan 2022-11-06 22:23:46 +02:00
parent acf3c084b8
commit d6ef8b0fdc
4 changed files with 17 additions and 9 deletions

View file

@ -2,10 +2,15 @@
-- https://github.com/nvim-treesitter/nvim-treesitter/wiki/Colorschemes -- https://github.com/nvim-treesitter/nvim-treesitter/wiki/Colorschemes
local vars = require('user.vars') local vars = require('user.vars')
local have_theme = false
local gb_status_ok, gruvbox = pcall(require, 'gruvbox') local gb_status_ok, gruvbox = pcall(require, 'gruvbox')
if gb_status_ok then if gb_status_ok then
gruvbox.setup({}) gruvbox.setup({})
have_theme = true
end end
vim.opt.background = "dark" vim.opt.background = "dark"
if have_theme then
vim.cmd("colorscheme " .. vars.colorscheme) vim.cmd("colorscheme " .. vars.colorscheme)
end

View file

@ -6,8 +6,8 @@ require("user.lsp")
require("user.cmp") require("user.cmp")
require("user.treesitter") require("user.treesitter")
require("user.keymaps") require("user.keymaps")
require("user.colors")
require("user.lualine") require("user.lualine")
require("user.colors")
-- Make sure plugins are installed -- Make sure plugins are installed
--vim.cmd(":PackerClean") --vim.cmd(":PackerClean")

View file

@ -5,7 +5,6 @@ local inoremap = Remap.inoremap
local xnoremap = Remap.xnoremap local xnoremap = Remap.xnoremap
local nmap = Remap.nmap local nmap = Remap.nmap
local telescope = require('telescope.builtin')
-- NvimTree toggle/refresh/findfile -- NvimTree toggle/refresh/findfile
@ -14,9 +13,12 @@ nnoremap("<leader>r", ":NvimTreeRefresh<CR>")
nnoremap("<leader>n", ":NvimTreeFindFile<CR>") nnoremap("<leader>n", ":NvimTreeFindFile<CR>")
-- Telescope -- Telescope
local telescope_status_ok, telescope = pcall(require, "telescope.builtin")
if telescope_status_ok then
nnoremap("<C-p>", telescope.find_files) nnoremap("<C-p>", telescope.find_files)
nnoremap("<C-s>", telescope.live_grep) nnoremap("<C-s>", telescope.live_grep)
nnoremap("<C-f>", telescope.current_buffer_fuzzy_find) nnoremap("<C-f>", telescope.current_buffer_fuzzy_find)
end
-- Copy to system clipboard -- Copy to system clipboard
vnoremap('<leader>y', '"+y') vnoremap('<leader>y', '"+y')
@ -35,5 +37,3 @@ nnoremap('<C-J>', '<C-W><C-J>')
nnoremap('<C-K>', '<C-W><C-K>') nnoremap('<C-K>', '<C-W><C-K>')
nnoremap('<C-L>', '<C-W><C-L>') nnoremap('<C-L>', '<C-W><C-L>')
nnoremap('<C-H>', '<C-W><C-H>') nnoremap('<C-H>', '<C-W><C-H>')

View file

@ -44,3 +44,6 @@ vim.opt.colorcolumn = "80"
vim.g.mapleader = " " vim.g.mapleader = " "
vim.wo.cursorline = true vim.wo.cursorline = true
-- Enable mouse support
vim.opt.mouse = 'a'