Added comments, unified indentation and style

This commit is contained in:
Јован Ђокић-Шумарац 2023-08-03 12:56:24 +02:00
parent 5b1b76ce94
commit 8cc56f2ca8
16 changed files with 211 additions and 162 deletions

View file

@ -8,6 +8,8 @@
-- ╚═╝ ╚═╝ ╚═╝╚═╝╚═╝ ╚═╝ ╚═╝
-- Setup Lazy.nvim and plugins
require("plugins")
-- Setup standard neovim options
require("options")

View file

@ -3,4 +3,3 @@
-- vim.g.onedark_config = { style = 'darker' }
vim.cmd("colorscheme carbonfox")

View file

@ -1,21 +1,23 @@
vim.g.mapleader = " "
local map = vim.api.nvim_set_keymap
local cmap = vim.keymap.set
local options = { noremap = true }
local cmd_options = { noremap = true, silent = true }
local tele = require('telescope.builtin')
local neogit = require('neogit')
vim.g.mapleader = " "
-- open git integration
map("n", "<leader>g", "<cmd>Neogit kind=split<CR>", options)
@ -32,29 +34,33 @@ end)
-- slef explanitory
map("n", "<leader>tw", "<cmd>lua MiniTrailspace.trim()<CR>", options)
map("n", "<leader>fm", "<cmd>CHADopen<CR>", options)
map("n", "<leader>fc", "<cmd>NERDTreeClose<CR>", options)
map("n", "<leader>tt", "<cmd>12 split <CR><cmd>Tnew<CR>", options)
map("n", "<leader>zt", "<cmd>Twilight<CR>", options)
map("n", "<leader>zz", "<cmd>ZenMode<CR>", options)
-- remap keys so that they dont skip camelCase
map("n", "w", "<Plug>CamelCaseMotion_w", cmd_options)
map("n", "b", "<Plug>CamelCaseMotion_b", cmd_options)
map("n", "e", "<Plug>CamelCaseMotion_e", cmd_options)
map("n", "ge", "<Plug>CamelCaseMotion_ge", cmd_options)
-- Dashboard and pomodoro
map("n", "<leader>v", "<cmd>Veil<CR>", options)
map("n", "<leader>p", "<cmd>NomoMenu<CR>", options)
-- this little guy helps you move text, really helpful
map("v", "J", ":m '>+1<CR>gv=gv", options)
map("v", "K", ":m '<-2<CR>gv=gv", options)
-- Cursor always stays on center
map("n", "J", "mzJ`z", options)
map("n", "<C-d>", "<C-d>zz", options)
map("n", "<C-u>", "<C-u>zz", options)
@ -62,20 +68,26 @@ map("n", "n", "nzzzv", options)
map("n", "N", "Nzzzv", options)
-- greatest remap ever
-- paste text but DONT copy the overridden text
cmap("x", "p", [["_dP]])
cmap("x", "<leader>p", [["+dP]])
-- delete text but DONT copy to clipboard
cmap({ "n", "v" }, "<leader>d", [["_d]])
-- quickfix stuff
--
--
map("n", "<C-k>", "<cmd>cnext<CR>zz", options)
map("n", "<C-j>", "<cmd>cprev<CR>zz", options)
map("n", "<leader>k", "<cmd>lnext<CR>zz", options)
map("n", "<leader>j", "<cmd>lprev<CR>zz", options)
-- search and replace every instance of word under cursor
cmap("n", "<leader>s", [[:%s/\<<C-r><C-w>\>/<C-r><C-w>/gI<Left><Left><Left>]])
-- take a break !
map("n", "<leader>mr", "<cmd>CellularAutomaton make_it_rain<CR>", options)

View file

@ -17,10 +17,10 @@ o.termguicolors = true -- true colours for better experience
o.wrap = false -- don't wrap lines
o.backupcopy = "yes" -- fix weirdness for stuff that replaces the entire file when hot reloading
o.compatible = false
o.showmatch = true
o.hlsearch = true
o.incsearch = true
o.compatible = false -- disable compatibility with old vi
o.showmatch = true -- show matches while searching for text
o.hlsearch = true -- highlight text that has been searched
o.incsearch = true -- incramentally search
o.tabstop = 16
o.softtabstop = 4
o.shiftwidth = 4
@ -28,13 +28,13 @@ o.autoindent = true
o.wildmode = "longest,list"
o.mouse = "v"
o.mouse = "a"
o.clipboard = "unnamedplus"
o.clipboard = "unnamedplus" -- use system clipboard
o.ttyfast = true
o.cursorline = true
o.splitbelow = true
o.autochdir = true
o.signcolumn="yes:1"
o.shell = "/bin/dash"
o.shell = "/bin/bash"
vim.api.nvim_command("filetype off")
vim.api.nvim_command("let &runtimepath.=',~/.vim/bundle/neoterm'")
@ -44,7 +44,7 @@ vim.api.nvim_command("syntax on")
-- disable builtin plugins as they are not needed
local disabled_built_ins = {
"netrw",
"netrwPlugin",

View file

@ -10,17 +10,22 @@ require'nvim-web-devicons'.setup {
name = "Zsh"
}
};
-- globally enable different highlight colors per icon (default to true)
-- if set to false all icons will have the default icon's color
color_icons = true;
-- globally enable default icons (default to false)
-- will get overriden by `get_icons` option
default = true;
-- globally enable "strict" selection of icons - icon will be looked up in
-- different tables, first by filename, and if not found by extension; this
-- prevents cases when file doesn't have any extension but still gets some icon
-- because its name happened to match some extension (default to false)
strict = true;
-- same as `override` but specifically for overrides by filename
-- takes effect when `strict` is true
override_by_filename = {

View file

@ -3,7 +3,7 @@ require('drop').setup
---@type DropTheme|string
theme = "leaves", -- can be one of rhe default themes, or a custom theme
max = 15, -- maximum number of drops on the screen
interval = 100, -- every 150ms we update the drops
screensaver = 1000 * 60 * 1, -- show after 5 minutes. Set to false, to disable
interval = 100, -- every 100ms we update the drops
screensaver = 1000 * 60 * 3, -- show after 3 minutes. Set to false, to disable
filetypes = { "veil" }, -- will enable/disable automatically for the following filetypes
}

View file

@ -1,12 +1,14 @@
vim.g.mapleader = " "
local mark = require("harpoon.mark")
local ui = require("harpoon.ui")
vim.g.mapleader = " "
-- show harpoon menu and add file to harpoon list
vim.keymap.set("n", "<leader>ma", mark.add_file)
vim.keymap.set("n", "<leader>mm", ui.toggle_quick_menu)
-- main 4 files of harpoon jumping
vim.keymap.set("n", "<C-h>", function() ui.nav_file(1) end)
vim.keymap.set("n", "<C-t>", function() ui.nav_file(2) end)
vim.keymap.set("n", "<C-n>", function() ui.nav_file(3) end)

View file

@ -1,12 +1,13 @@
require('hlchunk').setup({
indent = {
chars = { "·", "·", "·", "·", }, -- more code can be found in https://unicodeplus.com/
chars = { "·", "·", "·", "·", },
--chars = { "│", "¦", "┆", "┊", }, -- more code can be found in https://unicodeplus.com/
style = {
"#333333",
},
},
blank = {
enable = false,
},

View file

@ -1,7 +1,5 @@
require("plugins.lazy")
require("plugins.noice")
require("plugins.neorg")
require("plugins.treesitter")
require("plugins.drop")
@ -11,10 +9,6 @@ require("plugins.nomodoro")
require("plugins.devicons")
require("plugins.lualine")
require("plugins.veil")
require("plugins.harpoon")
require("plugins.hlblocks")
require("plugins.gitsigns")

View file

@ -1,5 +1,6 @@
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({
"git",
@ -10,6 +11,7 @@ if not vim.loop.fs_stat(lazypath) then
lazypath,
})
end
vim.opt.rtp:prepend(lazypath)
@ -176,6 +178,7 @@ require("lazy").setup({
},
-- this is pure magic, i love this guy
{
'VonHeikemen/lsp-zero.nvim',
branch = 'v2.x',

View file

@ -25,7 +25,7 @@ cmp.setup({
-- Cycle with tab, as intended by divine creation
["<Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_next_item()

View file

@ -2,21 +2,26 @@ require('lualine').setup {
options = {
icons_enabled = true,
theme = 'carbonfox',
component_separators = { left = '', right = ''},
section_separators = { left = '', right = ''},
disabled_filetypes = {
statusline = {},
winbar = {},
},
ignore_focus = {},
always_divide_middle = true,
globalstatus = false,
refresh = {
statusline = 1000,
tabline = 1000,
winbar = 1000,
}
},
sections = {
lualine_a = {'mode'},
lualine_b = {'branch', 'diff', 'diagnostics'},
@ -33,6 +38,7 @@ require('lualine').setup {
lualine_y = {},
lualine_z = {}
},
tabline = {},
winbar = {},
inactive_winbar = {},

View file

@ -3,6 +3,8 @@ require("noice").setup({
health = {
checker = false
},
cmdline = {
format = {
cmdline = {
@ -39,6 +41,8 @@ require("noice").setup({
input = {}
}
},
opts = {
win_options = {
winhighlight = {
@ -48,6 +52,8 @@ require("noice").setup({
}
}
},
lsp = {
progress = {
enabled = true
@ -58,6 +64,8 @@ require("noice").setup({
["cmp.entry.get_documentation"] = true
}
},
-- show command prompt on top of the buffer, no border
views = {
cmdline_popup = {
position = {
@ -73,13 +81,19 @@ require("noice").setup({
},
}
},
presets = {
long_message_to_split = true,
lsp_doc_border = true
},
popupmenu = {
backend = "cmp"
},
format = {}
})

View file

@ -1,22 +1,28 @@
require('nomodoro').setup({
work_time = 1,
break_time = 1,
work_time = 25,
break_time = 5,
menu_available = true,
texts = {
on_break_complete = "BREAK IS UP!",
on_work_complete = "TIME IS UP!",
on_break_complete = "Break is over!",
on_work_complete = "Take a break!",
status_icon = "",
timer_format = '!%0M:%0S' -- To include hours: '!%0H:%0M:%0S'
},
-- force break time yaaay
on_work_complete = function()
vim.cmd('CellularAutomaton make_it_rain')
end,
-- resume
on_break_complete = function()
vim.cmd('Veil')
end
})
-- Show timer status in lualine, on the right
require('lualine').setup({
sections = {
lualine_x = {

View file

@ -9,31 +9,8 @@ require("veil").setup({
builtin.sections.animated(builtin.headers.frames_days_of_week[current_day], {
hl = { fg = "#5de4c7" },
}),
builtin.sections.buttons({
{
icon = "",
text = "Find Files",
shortcut = "f",
callback = function()
require("telescope.builtin").find_files()
end,
},
{
icon = "",
text = "Find Word",
shortcut = "w",
callback = function()
require("telescope.builtin").live_grep()
end,
},
{
icon = "",
text = "Buffers",
shortcut = "b",
callback = function()
require("telescope.builtin").buffers()
end,
},
{
icon = "",
text = "Config",
@ -44,12 +21,40 @@ require("veil").setup({
})
end,
},
{
icon = "",
text = "Find Files",
shortcut = "f",
callback = function()
require("telescope.builtin").find_files()
end,
},
{
icon = "",
text = "Grep",
shortcut = "g",
callback = function()
require("telescope.builtin").live_grep()
end,
},
{
icon = "",
text = "Buffers",
shortcut = "b",
callback = function()
require("telescope.builtin").buffers()
end,
},
}),
builtin.sections.oldfiles(),
},
mappings = {},
startup = true,
listed = false
listed = true
})