Back up work

This commit is contained in:
Јован Ђокић-Шумарац 2024-02-04 00:25:41 +01:00
parent 9a4a943a31
commit 1e8e67a6eb
32 changed files with 153 additions and 241 deletions

0
.gitignore vendored Normal file → Executable file
View file

0
LICENSE Normal file → Executable file
View file

0
README.md Normal file → Executable file
View file

0
init.lua Normal file → Executable file
View file

0
lua/options/colors.lua Normal file → Executable file
View file

0
lua/options/init.lua Normal file → Executable file
View file

49
lua/options/keybind.lua Normal file → Executable file
View file

@ -8,49 +8,11 @@ local cmap = vim.keymap.set
local options = { noremap = true } local options = { noremap = true }
local cmd_options = { noremap = true, silent = true } local cmd_options = { noremap = true, silent = true }
local tele = require('telescope.builtin')
local neogit = require('neogit')
-- Launch panel if nothing is typed after <leader>z
cmap("n", "<leader>z", "<cmd>Telekasten panel<CR>")
-- Most used functions
cmap("n", "<leader>zf", "<cmd>Telekasten find_notes<CR>")
cmap("n", "<leader>zg", "<cmd>Telekasten search_notes<CR>")
cmap("n", "<leader>zt", "<cmd>Telekasten goto_today<CR>")
cmap("n", "<leader>zn", "<cmd>Telekasten new_note<CR>")
cmap("n", "<leader>zc", "<cmd>Telekasten show_calendar<CR>")
cmap("n", "<leader>zb", "<cmd>Telekasten show_backlinks<CR>")
-- Call insert link automatically when we start typing a link
cmap("i", "[[", "<cmd>Telekasten insert_link<CR>")
-- open git integration
map("n", "<leader>g", "<cmd>Neogit kind=split<CR>", options)
-- TELESCOPE
cmap("n", "<leader>ff", tele.find_files, options)
map("n", "<leader>fh", "<cmd>Telescope find_files hidden=true<CR>", options)
cmap("n", "<leader>fg", tele.git_files, options)
cmap("n", "<leader>fs", function()
tele.grep_string({ search = vim.fn.input("Grep > ") });
end)
-- slef explanitory -- slef explanitory
map("n", "<leader>tw", "<cmd>lua MiniTrailspace.trim()<CR>", options) map("n", "<leader>tw", "<cmd>lua MiniTrailspace.trim()<CR>", options)
map("n", "<leader>fm", "<cmd>NvimTreeToggle<CR>", options) map("n", "<leader>fm", "<cmd>NvimTreeToggle<CR>", options)
map("n", "<leader>tt", "<cmd>12 split <CR><cmd>Tnew<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 -- remap keys so that they dont skip camelCase
@ -60,12 +22,6 @@ map("n", "e", "<Plug>CamelCaseMotion_e", cmd_options)
map("n", "ge", "<Plug>CamelCaseMotion_ge", 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 -- this little guy helps you move text, really helpful
map("v", "J", ":m '>+1<CR>gv=gv", options) map("v", "J", ":m '>+1<CR>gv=gv", options)
map("v", "K", ":m '<-2<CR>gv=gv", options) map("v", "K", ":m '<-2<CR>gv=gv", options)
@ -97,8 +53,3 @@ map("n", "<leader>j", "<cmd>lprev<CR>zz", options)
-- search and replace every instance of word under cursor -- 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>]]) 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)

0
lua/options/opts.lua Normal file → Executable file
View file

73
lua/plugins/bufferline.lua Executable file
View file

@ -0,0 +1,73 @@
local bufferline = require('bufferline')
bufferline.setup {
options = {
mode = "buffers", -- set to "tabs" to only show tabpages instead
style_preset = bufferline.style_preset.default, -- or bufferline.style_preset.minimal,
themable = true, -- allows highlight groups to be overriden i.e. sets highlights as default
numbers = "none" ,
close_command = "bdelete! %d", -- can be a string | function, | false see "Mouse actions"
right_mouse_command = "bdelete! %d", -- can be a string | function | false, see "Mouse actions"
left_mouse_command = "buffer %d", -- can be a string | function, | false see "Mouse actions"
middle_mouse_command = nil, -- can be a string | function, | false see "Mouse actions"
indicator = {
icon = '/', -- this should be omitted if indicator style is not 'icon'
style = 'icon' ,
},
buffer_close_icon = '󰅖',
modified_icon = '',
close_icon = '',
left_trunc_marker = '',
right_trunc_marker = '',
--- name_formatter can be used to change the buffer's label in the bufferline.
--- Please note some names can/will break the
--- bufferline so use this at your discretion knowing that it has
--- some limitations that will *NOT* be fixed.
max_name_length = 25,
max_prefix_length = 15, -- prefix used when a buffer is de-duplicated
truncate_names = true, -- whether or not tab names should be truncated
tab_size = 25,
diagnostics = false,
diagnostics_update_in_insert = false,
-- The diagnostics indicator can be set to nil to keep the buffer name highlight but delete the highlighting
-- NOTE: this will be called a lot so don't do any heavy processing here
offsets = {
{
filetype = "NvimTree",
text = "File Explorer" ,
text_align = "center",
separator = true
}
},
color_icons = true , -- whether or not to add the filetype icon highlights
get_element_icon = function(element)
-- element consists of {filetype: string, path: string, extension: string, directory: string}
-- This can be used to change how bufferline fetches the icon
-- for an element e.g. a buffer or a tab.
-- e.g.
local icon, hl = require('nvim-web-devicons').get_icon_by_filetype(element.filetype, { default = false })
return icon, hl
-- or
end,
show_buffer_icons = true , -- disable filetype icons for buffers
show_buffer_close_icons = true ,
show_close_icon = true ,
show_tab_indicators = true ,
show_duplicate_prefix = true , -- whether to show duplicate buffer prefix
persist_buffer_sort = true, -- whether or not custom sorted buffers should persist
move_wraps_at_ends = false, -- whether or not the move command "wraps" at the first or last position
-- can also be a table containing 2 custom separators
-- [focused and unfocused]. eg: { '|', '|' }
separator_style = "thin" ,
enforce_regular_tabs = false ,
always_show_bufferline = true ,
hover = {
enabled = true,
delay = 200,
reveal = {'close'}
},
sort_by = 'insert_at_end', function(buffer_a, buffer_b)
-- add custom logic
return buffer_a.modified > buffer_b.modified
end
}
}

0
lua/plugins/devicons.lua Normal file → Executable file
View file

0
lua/plugins/drop.lua Normal file → Executable file
View file

12
lua/plugins/gitsigns.lua Normal file → Executable file
View file

@ -1,11 +1,11 @@
require('gitsigns').setup { require('gitsigns').setup {
signs = { signs = {
add = { text = '' }, add = { text = '' },
change = { text = '' }, change = { text = '' },
delete = { text = '' }, delete = { text = '' },
topdelete = { text = '' }, topdelete = { text = '' },
changedelete = { text = '' }, changedelete = { text = '' },
untracked = { text = '|' }, untracked = { text = '' },
}, },
signcolumn = true, -- Toggle with `:Gitsigns toggle_signs` signcolumn = true, -- Toggle with `:Gitsigns toggle_signs`

0
lua/plugins/harpoon.lua Normal file → Executable file
View file

25
lua/plugins/hlblocks.lua Normal file → Executable file
View file

@ -4,8 +4,17 @@ require('hlchunk').setup({
--chars = { "│", "¦", "┆", "┊", }, -- more code can be found in https://unicodeplus.com/ --chars = { "│", "¦", "┆", "┊", }, -- more code can be found in https://unicodeplus.com/
style = { style = {
"#888888",
"#666666",
"#444444",
"#333333", "#333333",
}, "#333333",
"#333333",
"#333333",
"#333333",
}
}, },
blank = { blank = {
@ -14,17 +23,17 @@ require('hlchunk').setup({
chunk = { chunk = {
chars = { chars = {
horizontal_line = "", horizontal_line = "",
vertical_line = "", vertical_line = "",
left_top = "", left_top = "",
left_bottom = "", left_bottom = "",
right_arrow = ">", right_arrow = "",
}, },
style = "#00ffff", style = "#FF7F00",
}, },
line_num = { line_num = {
style = "#00ffff", style = "#FFFFFF",
}, },
}) })

6
lua/plugins/init.lua Normal file → Executable file
View file

@ -1,13 +1,11 @@
require("plugins.lazy") require("plugins.lazy")
require("plugins.treesitter") require("plugins.treesitter")
require("plugins.drop")
require("plugins.mini")
require("plugins.lsp-zero") require("plugins.lsp-zero")
require("plugins.devicons") require("plugins.devicons")
require("plugins.lualine") require("plugins.lualine")
require("plugins.veil") -- require("plugins.harpoon")
require("plugins.harpoon")
require("plugins.hlblocks") require("plugins.hlblocks")
require("plugins.gitsigns") require("plugins.gitsigns")
require("plugins.nvimtree") require("plugins.nvimtree")
require("plugins.bufferline")
require("plugins.wilder") require("plugins.wilder")

124
lua/plugins/lazy.lua Normal file → Executable file
View file

@ -22,70 +22,34 @@ require("lazy").setup({
-- colorscheme -- colorscheme
"EdenEast/nightfox.nvim", "EdenEast/nightfox.nvim",
"luckasRanarison/tree-sitter-hypr",
'lambdalisue/nerdfont.vim',
{
'gelguy/wilder.nvim', 'gelguy/wilder.nvim',
config = function()
local wilder = require('wilder')
wilder.setup({modes = {':', '/', '?'}})
wilder.set_option('renderer', wilder.renderer_mux({
[':'] = wilder.popupmenu_renderer({
highlighter = wilder.basic_highlighter(),
}),
['/'] = wilder.wildmenu_renderer({
highlighter = wilder.basic_highlighter(),
}),
}))
wilder.set_option('renderer', wilder.popupmenu_renderer(
wilder.popupmenu_palette_theme({
-- 'single', 'double', 'rounded' or 'solid'
-- can also be a list of 8 characters, see :h wilder#popupmenu_palette_theme() for more details
border = 'rounded',
max_height = '75%', -- max height of the palette
min_height = 0, -- set to the same as 'max_height' for a fixed height window
prompt_position = 'top', -- 'top' or 'bottom' to set the location of the prompt
reverse = 0, -- set to 1 to reverse the order of the list, use in combination with 'prompt_position'
})
))
end,
},
-- Journaling and notes! with a calendar !
{ {
"renerocksai/telekasten.nvim", "rbong/vim-flog",
cmd = { "Flog", "Flogsplit", "Floggit" },
dependencies = { dependencies = {
"nvim-telescope/telescope.nvim", "tpope/vim-fugitive",
"renerocksai/calendar-vim"
}, },
config = function ()
require("telekasten").setup({
home = vim.fn.expand("~/zettelkasten"), -- Put the name of your notes directory here
})
end
}, },
-- Focus more ! 'kassio/neoterm',
"folke/twilight.nvim",
"folke/zen-mode.nvim",
-- it's annoying that w skips the whole word, so let's fix it -- it's annoying that w skips the whole word, so let's fix it
"bkad/camelcasemotion", "bkad/camelcasemotion",
-- very good file jumping system -- very good file jumping system
{
"ThePrimeagen/harpoon", "ThePrimeagen/harpoon",
dependencies = "nvim-lua/plenary.nvim",
version = "harpoon2"
},
-- arbitrarily comment -- arbitrarily comment
"tpope/vim-commentary", "tpope/vim-commentary",
-- this one is just fun
"eandrju/cellular-automaton.nvim",
-- indicate what has changed in git repo
"lewis6991/gitsigns.nvim", "lewis6991/gitsigns.nvim",
-- like magit for emacs -- like magit for emacs
@ -107,13 +71,6 @@ require("lazy").setup({
}, },
-- Debugger UI
{
"rcarriga/nvim-dap-ui",
dependencies = {"mfussenegger/nvim-dap"}
},
-- Surround text with quotes etc -- Surround text with quotes etc
{ {
"kylechui/nvim-surround", "kylechui/nvim-surround",
@ -152,68 +109,23 @@ require("lazy").setup({
} }
}, },
{
"NvChad/nvim-colorizer.lua",
config = function()
require('colorizer').setup()
end,
},
-- LEARN HJKL DAMMIT
{
"m4xshen/hardtime.nvim",
lazy = true,
opts = {}
},
-- dashboard and start page
{
"willothy/veil.nvim",
dependencies = {
"nvim-telescope/telescope.nvim",
"nvim-lua/plenary.nvim",
"nvim-telescope/telescope-file-browser.nvim"
},
},
-- size does not matter
{
"echasnovski/mini.nvim",
version = false,
},
-- need that syntax highlight amirite -- need that syntax highlight amirite
{ {
"nvim-treesitter/nvim-treesitter", "nvim-treesitter/nvim-treesitter",
build = ":TSUpdate" build = ":TSUpdate"
}, },
-- using lazy.nvim
-- the name says it all
{ {
"SirVer/ultisnips", "akinsho/bufferline.nvim",
lazy = true version = "*",
dependencies = 'nvim-tree/nvim-web-devicons',
config = function ()
vim.opt.termguicolors = true
require("bufferline").setup{}
end
}, },
-- That shmexy latex plugin
{
"lervag/vimtex",
lazy = true
},
-- Cool screensaver !!
{
"folke/drop.nvim",
event = "VimEnter",
},
-- this is pure magic, i love this guy -- this is pure magic, i love this guy
{ {
"VonHeikemen/lsp-zero.nvim", "VonHeikemen/lsp-zero.nvim",

19
lua/plugins/lsp-zero.lua Normal file → Executable file
View file

@ -9,15 +9,28 @@ end)
-- (Optional) Configure lua language server for neovim -- (Optional) Configure lua language server for neovim
require('lspconfig').lua_ls.setup(lsp.nvim_lua_ls()) require('lspconfig').lua_ls.setup(lsp.nvim_lua_ls())
require'lspconfig'.pylsp.setup{
settings = {
pylsp = {
plugins = {
pycodestyle = {
ignore = {'W391', 'E303', 'E226'},
maxLineLength = 120
}
}
}
}
}
lsp.setup() lsp.setup()
-- You need to setup `cmp` after lsp-zero -- You need to setup `cmp` after lsp-zero
local cmp = require('cmp') local cmp = require('cmp')
local cmp_action = require('lsp-zero').cmp_action() local cmp_action = require('lsp-zero').cmp_action()
cmp.setup({ cmp.setup({
mapping = { mapping = {
-- `Enter` key to confirm completion -- `Enter` key to confirm completion

0
lua/plugins/lualine.lua Normal file → Executable file
View file

0
lua/plugins/mini.lua Normal file → Executable file
View file

0
lua/plugins/nvimtree.lua Normal file → Executable file
View file

12
lua/plugins/treesitter.lua Normal file → Executable file
View file

@ -13,3 +13,15 @@ require'nvim-treesitter.configs'.setup {
enable = true, enable = true,
}, },
} }
local parser_config = require("nvim-treesitter.parsers").get_parser_configs()
parser_config.hypr = {
install_info = {
url = "https://github.com/luckasRanarison/tree-sitter-hypr",
files = { "src/parser.c" },
branch = "master",
},
filetype = "hypr",
}

View file

@ -1,61 +0,0 @@
local current_day = os.date("%A")
local builtin = require("veil.builtin")
require("veil").setup({
sections = {
builtin.sections.animated(builtin.headers.frames_days_of_week[current_day], {
hl = { fg = "#5de4c7" },
}),
builtin.sections.buttons({
{
icon = "",
text = "Config",
shortcut = "c",
callback = function()
require("telescope").extensions.file_browser.file_browser({
path = vim.fn.stdpath("config"),
})
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(),
},
startup = true,
listed = true
})

7
lua/plugins/wilder.lua Normal file → Executable file
View file

@ -7,9 +7,13 @@ wilder.setup({modes = {':', '/', '?'}})
wilder.set_option('renderer', wilder.renderer_mux({ wilder.set_option('renderer', wilder.renderer_mux({
[':'] = wilder.popupmenu_renderer({ [':'] = wilder.popupmenu_renderer({
highlighter = wilder.basic_highlighter(), highlighter = wilder.basic_highlighter(),
left = {' ', wilder.popupmenu_devicons()},
right = {' ', wilder.popupmenu_scrollbar()},
}), }),
['/'] = wilder.wildmenu_renderer({ ['/'] = wilder.wildmenu_renderer({
highlighter = wilder.basic_highlighter(), highlighter = wilder.basic_highlighter(),
left = {' ', wilder.popupmenu_devicons()},
right = {' ', wilder.popupmenu_scrollbar()},
}), }),
})) }))
@ -19,5 +23,6 @@ wilder.set_option('renderer', wilder.popupmenu_renderer({
highlighter = wilder.basic_highlighter(), highlighter = wilder.basic_highlighter(),
left = {' ', wilder.popupmenu_devicons()}, left = {' ', wilder.popupmenu_devicons()},
right = {' ', wilder.popupmenu_scrollbar()}, right = {' ', wilder.popupmenu_scrollbar()},
max_height = '30%', max_height = '20%',
min_width = '100%'
})) }))

0
pictures/errors.png Normal file → Executable file
View file

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

0
pictures/git.png Normal file → Executable file
View file

Before

Width:  |  Height:  |  Size: 71 KiB

After

Width:  |  Height:  |  Size: 71 KiB

0
pictures/hlchunks.png Normal file → Executable file
View file

Before

Width:  |  Height:  |  Size: 55 KiB

After

Width:  |  Height:  |  Size: 55 KiB

0
pictures/lsp-cmp.png Normal file → Executable file
View file

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 35 KiB

0
pictures/nvimtree.png Normal file → Executable file
View file

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 50 KiB

0
pictures/trixy-white.png Normal file → Executable file
View file

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 26 KiB

0
pictures/trixy.png Normal file → Executable file
View file

Before

Width:  |  Height:  |  Size: 9.6 KiB

After

Width:  |  Height:  |  Size: 9.6 KiB

0
pictures/veil.png Normal file → Executable file
View file

Before

Width:  |  Height:  |  Size: 60 KiB

After

Width:  |  Height:  |  Size: 60 KiB

0
pictures/zen.png Normal file → Executable file
View file

Before

Width:  |  Height:  |  Size: 82 KiB

After

Width:  |  Height:  |  Size: 82 KiB