Compare commits

..

No commits in common. "48473f5a6803d82ee9b253683a79b0b2a4650526" and "d39f6a98db47b4f5d9ea2bcb5e360f505be853e1" have entirely different histories.

6 changed files with 67 additions and 60 deletions

View File

@ -1,4 +1,6 @@
-- source options and mappings
-- source options
require('core')
-- load mappings
require('mappings')
-- load plugins and its options
require('lazy-plugins')

View File

@ -12,7 +12,7 @@
"friendly-snippets": { "branch": "main", "commit": "53d3df271d031c405255e99410628c26a8f0d2b0" },
"gitmoji.nvim": { "branch": "main", "commit": "326ddf01cbf3425566a089126ece7e8bd2560601" },
"gitsigns.nvim": { "branch": "main", "commit": "6ef8c54fb526bf3a0bc4efb0b2fe8e6d9a7daed2" },
"gruvbox-material": { "branch": "master", "commit": "7f56d9f9c4860df528031539d321a61f6e081dee" },
"gruvbox.nvim": { "branch": "main", "commit": "0940564208a490c173216c3b7d2188b0a5ad3491" },
"killersheep.nvim": { "branch": "master", "commit": "506823c47b854df02e78d5fec9468ab0e542dcf5" },
"lazy.nvim": { "branch": "main", "commit": "96584866b9c5e998cbae300594d0ccfd0c464627" },
"lualine.nvim": { "branch": "master", "commit": "2248ef254d0a1488a72041cfb45ca9caada6d994" },
@ -25,7 +25,7 @@
"nvim-cmp": { "branch": "main", "commit": "0b751f6beef40fd47375eaf53d3057e0bfa317e4" },
"nvim-colorizer.lua": { "branch": "master", "commit": "dde3084106a70b9a79d48f426f6d6fec6fd203f7" },
"nvim-lspconfig": { "branch": "master", "commit": "fcf153fbbf1facd16a71d46b92be8be495123a9f" },
"nvim-treesitter": { "branch": "master", "commit": "93750d388162f5658cfdb77bdcfe80711e637647" },
"nvim-treesitter": { "branch": "master", "commit": "e9acd01a4a1f6e584f76e736987f4c31401aa4b1" },
"nvim-treesitter-context": { "branch": "master", "commit": "bf4d15ee4e96ff5201f16a4ed14443670662eb90" },
"nvim-web-devicons": { "branch": "master", "commit": "5efb8bd06841f91f97c90e16de85e96d57e9c862" },
"plenary.nvim": { "branch": "master", "commit": "366b0837486f60ae0e7550c15de8ff66d057c4cd" },

View File

@ -1,60 +1,25 @@
-- CORE SETTINGS
local o = vim.o
local global = vim.g
local map = vim.keymap.set
-- look and feel
global.netrw_bufsettings = "noma nomod relativenumber nowrap ro nobl"
o.number = true
o.relativenumber = true
o.termguicolors = true
o.ruler = true
o.scrolloff = 10
o.relativenumber = true
o.number = true
o.showmode = false
o.spell = true
if vim.fn.has("termguicolors") == 1 then
o.termguicolors = true
end
o.scrolloff = 10
global.netrw_bufsettings = "noma nomod relativenumber nowrap ro nobl"
-- controlling
global.mapleader = ' '
o.autoindent = true
vim.opt.completeopt = { 'menu', 'menuone', 'noselect' }
o.ignorecase = true
o.smartcase = true
o.smartindent = true
vim.opt.completeopt = { 'menu', 'menuone', 'noselect' }
o.autoindent = true
-- vscode
if vim.g.vscode then
-- undo/REDO via vscode
map("n", "u", "<Cmd>call VSCodeNotify('undo')<CR>")
map("n", "<C-r>", "<Cmd>call VSCodeNotify('redo')<CR>")
map("n", "gf", "<Cmd>call VSCodeCall('editor.action.openLink')<CR>", { noremap = true })
end
-- leader settings
global.mapleader = ' '
-- generic mappings
map('v', '<', '<gv', { noremap = true })
map('v', '>', '>gv', { noremap = true })
map('n', 'Y', 'y$', { noremap = true })
map('n', 'n', 'nzzzv', { noremap = true })
map('n', 'N', 'Nzzzv', { noremap = true })
-- Shortcutting split navigation
map('', '<A-h>', '<C-w>h')
map('', '<A-j>', '<C-w>j')
map('', '<A-k>', '<C-w>k')
map('', '<A-l>', '<C-w>l')
map('', '<A-H>', '<C-w>H')
map('', '<A-J>', '<C-w>J')
map('', '<A-K>', '<C-w>K')
map('', '<A-L>', '<C-w>L')
map('', '<M-S-.>', '<C-w>>')
map('', '<M-S-,>', '<C-w><')
map('', '<M-S-=>', '<C-w>+')
map('', '<M-->', '<C-w>-')
map('', '<A-T>', '<C-w>T')
-- undo to the last , . or !
map('i', ',', ',<c-g>u', { noremap = true })
map('i', '.', '.<c-g>u', { noremap = true })
map('i', '!', '!<c-g>u', { noremap = true })
map('i', '?', '?<c-g>u', { noremap = true })
-- env settings for plugins
global.tagbar_sort = 0

View File

@ -12,6 +12,9 @@ end
vim.opt.rtp:prepend(lazypath)
local opts = {
install = {
colorscheme = { "gruvbox" }
},
dev = {
path = "~/.local/src"
}
@ -20,15 +23,11 @@ local opts = {
local plugins = {
-- main UI
{
"sainnhe/gruvbox-material",
"ellisonleao/gruvbox.nvim",
lazy = false,
priority = 1000,
config = function()
vim.g.gruvbox_material_better_performance = true
vim.g.gruvbox_material_enable_bold = true
vim.g.gruvbox_material_foreground = 1
vim.g.gruvbox_material_diagnostic_virtual_text = 'colored'
vim.cmd([[colorscheme gruvbox-material]])
vim.cmd([[colorscheme gruvbox]])
end
},
{
@ -164,6 +163,7 @@ local plugins = {
{
"folke/trouble.nvim",
lazy = true,
cmd = "Troubletoggle",
keys = {
vim.keymap.set("n", "<leader>xx", function() require("trouble").toggle() end),
vim.keymap.set("n", "<leader>xw",
@ -179,7 +179,7 @@ local plugins = {
vim.keymap.set('n', '<leader>D', function()
require("trouble").toggle("lsp_type_definitions")
end),
vim.keymap.set('n', 'gd', function()
vim.keymap.set('n', 'gd', function ()
require("trouble").toggle("lsp_definitions")
end),
vim.keymap.set('n', '<leader>gi', function()

37
lua/mappings.lua Normal file
View File

@ -0,0 +1,37 @@
local map = vim.keymap.set
-- vscode
if vim.g.vscode then
-- undo/REDO via vscode
map("n", "u", "<Cmd>call VSCodeNotify('undo')<CR>")
map("n", "<C-r>", "<Cmd>call VSCodeNotify('redo')<CR>")
map("n", "gf", "<Cmd>call VSCodeCall('editor.action.openLink')<CR>", { noremap = true })
end
-- generic mappings
map('v', '<', '<gv', { noremap = true })
map('v', '>', '>gv', { noremap = true })
map('n', 'Y', 'y$', { noremap = true })
map('n', 'n', 'nzzzv', { noremap = true })
map('n', 'N', 'Nzzzv', { noremap = true })
-- Shortcutting split navigation
map('', '<A-h>', '<C-w>h')
map('', '<A-j>', '<C-w>j')
map('', '<A-k>', '<C-w>k')
map('', '<A-l>', '<C-w>l')
map('', '<A-H>', '<C-w>H')
map('', '<A-J>', '<C-w>J')
map('', '<A-K>', '<C-w>K')
map('', '<A-L>', '<C-w>L')
map('', '<M-S-.>', '<C-w>>')
map('', '<M-S-,>', '<C-w><')
map('', '<M-S-=>', '<C-w>+')
map('', '<M-->', '<C-w>-')
map('', '<A-T>', '<C-w>T')
-- undo to the last , . or !
map('i', ',', ',<c-g>u', { noremap = true })
map('i', '.', '.<c-g>u', { noremap = true })
map('i', '!', '!<c-g>u', { noremap = true })
map('i', '?', '?<c-g>u', { noremap = true })

View File

@ -1,9 +1,9 @@
require 'lualine'.setup {
options = {
icons_enabled = true,
theme = 'gruvbox-material',
component_separators = { left = "", right = "|" },
section_separators = "",
theme = 'gruvbox',
component_separators = { '|', '|' },
section_separators = { '', '' },
disabled_filetypes = {}
},
sections = {
@ -12,7 +12,10 @@ require 'lualine'.setup {
'branch',
},
lualine_c = {
{ 'filename', path = 1 },
{
'filename',
path = 1
},
'diff',
},
lualine_x = { 'encoding', 'fileformat', 'filetype' },