Compare commits
No commits in common. "48473f5a6803d82ee9b253683a79b0b2a4650526" and "d39f6a98db47b4f5d9ea2bcb5e360f505be853e1" have entirely different histories.
48473f5a68
...
d39f6a98db
4
init.lua
4
init.lua
@ -1,4 +1,6 @@
|
|||||||
-- source options and mappings
|
-- source options
|
||||||
require('core')
|
require('core')
|
||||||
|
-- load mappings
|
||||||
|
require('mappings')
|
||||||
-- load plugins and its options
|
-- load plugins and its options
|
||||||
require('lazy-plugins')
|
require('lazy-plugins')
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
"friendly-snippets": { "branch": "main", "commit": "53d3df271d031c405255e99410628c26a8f0d2b0" },
|
"friendly-snippets": { "branch": "main", "commit": "53d3df271d031c405255e99410628c26a8f0d2b0" },
|
||||||
"gitmoji.nvim": { "branch": "main", "commit": "326ddf01cbf3425566a089126ece7e8bd2560601" },
|
"gitmoji.nvim": { "branch": "main", "commit": "326ddf01cbf3425566a089126ece7e8bd2560601" },
|
||||||
"gitsigns.nvim": { "branch": "main", "commit": "6ef8c54fb526bf3a0bc4efb0b2fe8e6d9a7daed2" },
|
"gitsigns.nvim": { "branch": "main", "commit": "6ef8c54fb526bf3a0bc4efb0b2fe8e6d9a7daed2" },
|
||||||
"gruvbox-material": { "branch": "master", "commit": "7f56d9f9c4860df528031539d321a61f6e081dee" },
|
"gruvbox.nvim": { "branch": "main", "commit": "0940564208a490c173216c3b7d2188b0a5ad3491" },
|
||||||
"killersheep.nvim": { "branch": "master", "commit": "506823c47b854df02e78d5fec9468ab0e542dcf5" },
|
"killersheep.nvim": { "branch": "master", "commit": "506823c47b854df02e78d5fec9468ab0e542dcf5" },
|
||||||
"lazy.nvim": { "branch": "main", "commit": "96584866b9c5e998cbae300594d0ccfd0c464627" },
|
"lazy.nvim": { "branch": "main", "commit": "96584866b9c5e998cbae300594d0ccfd0c464627" },
|
||||||
"lualine.nvim": { "branch": "master", "commit": "2248ef254d0a1488a72041cfb45ca9caada6d994" },
|
"lualine.nvim": { "branch": "master", "commit": "2248ef254d0a1488a72041cfb45ca9caada6d994" },
|
||||||
@ -25,7 +25,7 @@
|
|||||||
"nvim-cmp": { "branch": "main", "commit": "0b751f6beef40fd47375eaf53d3057e0bfa317e4" },
|
"nvim-cmp": { "branch": "main", "commit": "0b751f6beef40fd47375eaf53d3057e0bfa317e4" },
|
||||||
"nvim-colorizer.lua": { "branch": "master", "commit": "dde3084106a70b9a79d48f426f6d6fec6fd203f7" },
|
"nvim-colorizer.lua": { "branch": "master", "commit": "dde3084106a70b9a79d48f426f6d6fec6fd203f7" },
|
||||||
"nvim-lspconfig": { "branch": "master", "commit": "fcf153fbbf1facd16a71d46b92be8be495123a9f" },
|
"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-treesitter-context": { "branch": "master", "commit": "bf4d15ee4e96ff5201f16a4ed14443670662eb90" },
|
||||||
"nvim-web-devicons": { "branch": "master", "commit": "5efb8bd06841f91f97c90e16de85e96d57e9c862" },
|
"nvim-web-devicons": { "branch": "master", "commit": "5efb8bd06841f91f97c90e16de85e96d57e9c862" },
|
||||||
"plenary.nvim": { "branch": "master", "commit": "366b0837486f60ae0e7550c15de8ff66d057c4cd" },
|
"plenary.nvim": { "branch": "master", "commit": "366b0837486f60ae0e7550c15de8ff66d057c4cd" },
|
||||||
|
57
lua/core.lua
57
lua/core.lua
@ -1,60 +1,25 @@
|
|||||||
-- CORE SETTINGS
|
-- CORE SETTINGS
|
||||||
local o = vim.o
|
local o = vim.o
|
||||||
local global = vim.g
|
local global = vim.g
|
||||||
local map = vim.keymap.set
|
|
||||||
|
|
||||||
-- look and feel
|
-- look and feel
|
||||||
global.netrw_bufsettings = "noma nomod relativenumber nowrap ro nobl"
|
o.termguicolors = true
|
||||||
o.number = true
|
|
||||||
o.relativenumber = true
|
|
||||||
o.ruler = true
|
o.ruler = true
|
||||||
o.scrolloff = 10
|
o.relativenumber = true
|
||||||
|
o.number = true
|
||||||
o.showmode = false
|
o.showmode = false
|
||||||
o.spell = true
|
o.scrolloff = 10
|
||||||
if vim.fn.has("termguicolors") == 1 then
|
global.netrw_bufsettings = "noma nomod relativenumber nowrap ro nobl"
|
||||||
o.termguicolors = true
|
|
||||||
end
|
|
||||||
|
|
||||||
-- controlling
|
-- controlling
|
||||||
global.mapleader = ' '
|
vim.opt.completeopt = { 'menu', 'menuone', 'noselect' }
|
||||||
o.autoindent = true
|
|
||||||
o.ignorecase = true
|
o.ignorecase = true
|
||||||
o.smartcase = true
|
o.smartcase = true
|
||||||
o.smartindent = true
|
o.smartindent = true
|
||||||
vim.opt.completeopt = { 'menu', 'menuone', 'noselect' }
|
o.autoindent = true
|
||||||
|
|
||||||
-- vscode
|
-- leader settings
|
||||||
if vim.g.vscode then
|
global.mapleader = ' '
|
||||||
-- 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
|
-- env settings for plugins
|
||||||
map('v', '<', '<gv', { noremap = true })
|
global.tagbar_sort = 0
|
||||||
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 })
|
|
||||||
|
@ -12,6 +12,9 @@ end
|
|||||||
vim.opt.rtp:prepend(lazypath)
|
vim.opt.rtp:prepend(lazypath)
|
||||||
|
|
||||||
local opts = {
|
local opts = {
|
||||||
|
install = {
|
||||||
|
colorscheme = { "gruvbox" }
|
||||||
|
},
|
||||||
dev = {
|
dev = {
|
||||||
path = "~/.local/src"
|
path = "~/.local/src"
|
||||||
}
|
}
|
||||||
@ -20,15 +23,11 @@ local opts = {
|
|||||||
local plugins = {
|
local plugins = {
|
||||||
-- main UI
|
-- main UI
|
||||||
{
|
{
|
||||||
"sainnhe/gruvbox-material",
|
"ellisonleao/gruvbox.nvim",
|
||||||
lazy = false,
|
lazy = false,
|
||||||
priority = 1000,
|
priority = 1000,
|
||||||
config = function()
|
config = function()
|
||||||
vim.g.gruvbox_material_better_performance = true
|
vim.cmd([[colorscheme gruvbox]])
|
||||||
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]])
|
|
||||||
end
|
end
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -164,6 +163,7 @@ local plugins = {
|
|||||||
{
|
{
|
||||||
"folke/trouble.nvim",
|
"folke/trouble.nvim",
|
||||||
lazy = true,
|
lazy = true,
|
||||||
|
cmd = "Troubletoggle",
|
||||||
keys = {
|
keys = {
|
||||||
vim.keymap.set("n", "<leader>xx", function() require("trouble").toggle() end),
|
vim.keymap.set("n", "<leader>xx", function() require("trouble").toggle() end),
|
||||||
vim.keymap.set("n", "<leader>xw",
|
vim.keymap.set("n", "<leader>xw",
|
||||||
@ -179,7 +179,7 @@ local plugins = {
|
|||||||
vim.keymap.set('n', '<leader>D', function()
|
vim.keymap.set('n', '<leader>D', function()
|
||||||
require("trouble").toggle("lsp_type_definitions")
|
require("trouble").toggle("lsp_type_definitions")
|
||||||
end),
|
end),
|
||||||
vim.keymap.set('n', 'gd', function()
|
vim.keymap.set('n', 'gd', function ()
|
||||||
require("trouble").toggle("lsp_definitions")
|
require("trouble").toggle("lsp_definitions")
|
||||||
end),
|
end),
|
||||||
vim.keymap.set('n', '<leader>gi', function()
|
vim.keymap.set('n', '<leader>gi', function()
|
||||||
|
37
lua/mappings.lua
Normal file
37
lua/mappings.lua
Normal 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 })
|
@ -1,9 +1,9 @@
|
|||||||
require 'lualine'.setup {
|
require 'lualine'.setup {
|
||||||
options = {
|
options = {
|
||||||
icons_enabled = true,
|
icons_enabled = true,
|
||||||
theme = 'gruvbox-material',
|
theme = 'gruvbox',
|
||||||
component_separators = { left = "", right = "|" },
|
component_separators = { '|', '|' },
|
||||||
section_separators = "",
|
section_separators = { '', '' },
|
||||||
disabled_filetypes = {}
|
disabled_filetypes = {}
|
||||||
},
|
},
|
||||||
sections = {
|
sections = {
|
||||||
@ -12,7 +12,10 @@ require 'lualine'.setup {
|
|||||||
'branch',
|
'branch',
|
||||||
},
|
},
|
||||||
lualine_c = {
|
lualine_c = {
|
||||||
{ 'filename', path = 1 },
|
{
|
||||||
|
'filename',
|
||||||
|
path = 1
|
||||||
|
},
|
||||||
'diff',
|
'diff',
|
||||||
},
|
},
|
||||||
lualine_x = { 'encoding', 'fileformat', 'filetype' },
|
lualine_x = { 'encoding', 'fileformat', 'filetype' },
|
||||||
|
Loading…
Reference in New Issue
Block a user