Compare commits
3 Commits
d39f6a98db
...
48473f5a68
Author | SHA1 | Date | |
---|---|---|---|
|
48473f5a68 | ||
|
1cda15e20b | ||
|
828431ef70 |
4
init.lua
4
init.lua
@ -1,6 +1,4 @@
|
|||||||
-- source options
|
-- source options and mappings
|
||||||
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.nvim": { "branch": "main", "commit": "0940564208a490c173216c3b7d2188b0a5ad3491" },
|
"gruvbox-material": { "branch": "master", "commit": "7f56d9f9c4860df528031539d321a61f6e081dee" },
|
||||||
"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": "e9acd01a4a1f6e584f76e736987f4c31401aa4b1" },
|
"nvim-treesitter": { "branch": "master", "commit": "93750d388162f5658cfdb77bdcfe80711e637647" },
|
||||||
"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" },
|
||||||
|
59
lua/core.lua
59
lua/core.lua
@ -1,25 +1,60 @@
|
|||||||
-- 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
|
||||||
o.termguicolors = true
|
|
||||||
o.ruler = true
|
|
||||||
o.relativenumber = true
|
|
||||||
o.number = true
|
|
||||||
o.showmode = false
|
|
||||||
o.scrolloff = 10
|
|
||||||
global.netrw_bufsettings = "noma nomod relativenumber nowrap ro nobl"
|
global.netrw_bufsettings = "noma nomod relativenumber nowrap ro nobl"
|
||||||
|
o.number = true
|
||||||
|
o.relativenumber = true
|
||||||
|
o.ruler = true
|
||||||
|
o.scrolloff = 10
|
||||||
|
o.showmode = false
|
||||||
|
o.spell = true
|
||||||
|
if vim.fn.has("termguicolors") == 1 then
|
||||||
|
o.termguicolors = true
|
||||||
|
end
|
||||||
|
|
||||||
-- controlling
|
-- controlling
|
||||||
vim.opt.completeopt = { 'menu', 'menuone', 'noselect' }
|
global.mapleader = ' '
|
||||||
|
o.autoindent = true
|
||||||
o.ignorecase = true
|
o.ignorecase = true
|
||||||
o.smartcase = true
|
o.smartcase = true
|
||||||
o.smartindent = true
|
o.smartindent = true
|
||||||
o.autoindent = true
|
vim.opt.completeopt = { 'menu', 'menuone', 'noselect' }
|
||||||
|
|
||||||
-- leader settings
|
-- vscode
|
||||||
global.mapleader = ' '
|
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
|
||||||
|
|
||||||
-- env settings for plugins
|
-- generic mappings
|
||||||
global.tagbar_sort = 0
|
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 })
|
||||||
|
@ -12,9 +12,6 @@ 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"
|
||||||
}
|
}
|
||||||
@ -23,11 +20,15 @@ local opts = {
|
|||||||
local plugins = {
|
local plugins = {
|
||||||
-- main UI
|
-- main UI
|
||||||
{
|
{
|
||||||
"ellisonleao/gruvbox.nvim",
|
"sainnhe/gruvbox-material",
|
||||||
lazy = false,
|
lazy = false,
|
||||||
priority = 1000,
|
priority = 1000,
|
||||||
config = function()
|
config = function()
|
||||||
vim.cmd([[colorscheme gruvbox]])
|
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]])
|
||||||
end
|
end
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -163,7 +164,6 @@ 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",
|
||||||
|
@ -1,37 +0,0 @@
|
|||||||
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',
|
theme = 'gruvbox-material',
|
||||||
component_separators = { '|', '|' },
|
component_separators = { left = "", right = "|" },
|
||||||
section_separators = { '', '' },
|
section_separators = "",
|
||||||
disabled_filetypes = {}
|
disabled_filetypes = {}
|
||||||
},
|
},
|
||||||
sections = {
|
sections = {
|
||||||
@ -12,10 +12,7 @@ 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