change stuff i guess

This commit is contained in:
Јован Ђокић-Шумарац 2024-07-12 11:57:47 +02:00
parent 65128a7629
commit bfd59534b4
7 changed files with 317 additions and 259 deletions

View file

@ -1,12 +1,23 @@
-- _.gd8888888bp._
-- ████████╗██████╗ ██╗██╗ ██╗██╗ ██╗ .g88888888888888888p.
-- ╚══██╔══╝██╔══██╗██║╚██╗██╔╝╚██╗ ██╔╝ .d8888P"" ""Y8888b.
-- ██║ ██████╔╝██║ ╚███╔╝ ╚████╔╝ "Y8P" "Y8P'
-- ██║ ██╔══██╗██║ ██╔██╗ ╚██╔╝ `. ,'
-- ██║ ██║ ██║██║██╔╝ ██╗ ██║ \ .-. /
-- ╚═╝ ╚═╝ ╚═╝╚═╝╚═╝ ╚═╝ ╚═╝ \ (___) /
-- .------------------._______________________:__________j
-- / | | |`-.,_
-- \###################|######################|###########|,-'`
-- `------------------' : ___ l
-- / ( ) \
-- / `-' \
-- ,' `.
-- Listen up, you motherfuckers, .d8b. .d8b.
-- Those Ivy League dopes, they wanna "Y8888p.. ,.d8888P"
-- mock us. Tell 'em all this is war. "Y88888888888888888P"
-- And not fighting a war is for suckers. ""YY8888888PP""
-- ████████╗██████╗ ██╗██╗ ██╗██╗ ██╗
-- ╚══██╔══╝██╔══██╗██║╚██╗██╔╝╚██╗ ██╔╝
-- ██║ ██████╔╝██║ ╚███╔╝ ╚████╔╝
-- ██║ ██╔══██╗██║ ██╔██╗ ╚██╔╝
-- ██║ ██║ ██║██║██╔╝ ██╗ ██║
-- ╚═╝ ╚═╝ ╚═╝╚═╝╚═╝ ╚═╝ ╚═╝
-- Setup Lazy.nvim and plugins -- Setup Lazy.nvim and plugins
require("plugins") require("plugins")
@ -15,8 +26,6 @@ require("plugins")
require("options") require("options")
if vim.g.neovide then if vim.g.neovide then
vim.o.guifont = "FiraCode Nerd Font:h14" vim.o.guifont = "FiraCode Nerd Font:h14"
vim.g.neovide_scale_factor = 1.0 vim.g.neovide_scale_factor = 1.0

View file

@ -1,7 +1 @@
-- vim.opt.termguicolors = true
-- vim.opt.background = "dark"
-- vim.g.onedark_config = { style = 'darker' }
vim.cmd("colorscheme carbonfox") vim.cmd("colorscheme carbonfox")
-- vim.opt.background = "dark" -- set this to dark or light
-- vim.cmd.colorscheme "oxocarbon"

View file

@ -1,3 +1,3 @@
require("options.colors") require("options.colors")
require("options.opts")
require("options.keybind") require("options.keybind")
require("options.opts")

View file

@ -12,10 +12,17 @@ map('n', '<C-space>', '<cmd>Telescope buffers<CR>', options)
-- slef explanitory -- slef explanitory
map("n", "<leader>tw", "<cmd>lua MiniTrailspace.trim()<CR>", options) map("n", "<leader>tw", "<cmd>lua MiniTrailspace.trim()<CR>", options)
vim.keymap.set("n", "<leader>f", function() vim.keymap.set("n", "<leader>fo", function()
require("oil").open() require("oil").open()
end) end)
map("n", "<leader>ff", "<cmd>Telescope find_files<CR>", options)
map("n", "<leader>fs", "<cmd>Telescope current_buffer_fuzzy_find<CR>", options)
map("n", "<leader>gs", "<cmd>Telescope git_status<CR>", options)
map("n", "<leader>gg", "<cmd>Telescope live_grep<CR>", options)
-- remap keys so that they dont skip camelCase -- remap keys so that they dont skip camelCase
map("n", "w", "<Plug>CamelCaseMotion_w", cmd_options) map("n", "w", "<Plug>CamelCaseMotion_w", cmd_options)
map("n", "b", "<Plug>CamelCaseMotion_b", cmd_options) map("n", "b", "<Plug>CamelCaseMotion_b", cmd_options)

View file

@ -16,10 +16,10 @@ o.termguicolors = true -- true colours for better experience
o.wrap = false -- don't wrap lines o.wrap = false -- don't wrap lines
o.backupcopy = "yes" -- fix weirdness for stuff that replaces the entire file when hot reloading o.backupcopy = "yes" -- fix weirdness for stuff that replaces the entire file when hot reloading
o.smarttab = false -- make tab behaviour smarter o.smarttab = false
o.tabstop = 4 o.tabstop = 4
o.softtabstop = 2 o.softtabstop = 4
o.shiftwidth = 2 o.shiftwidth = 4
o.compatible = false -- disable compatibility with old vi o.compatible = false -- disable compatibility with old vi
o.showmatch = true -- show matches while searching for text o.showmatch = true -- show matches while searching for text
@ -39,13 +39,11 @@ o.signcolumn="yes:1"
o.shell = "/bin/zsh" o.shell = "/bin/zsh"
o.splitright = false o.splitright = false
vim.api.nvim_command("filetype off") -- vim.api.nvim_command("filetype off")
vim.api.nvim_command("let &runtimepath.=',~/.vim/bundle/neoterm'") -- vim.api.nvim_command("let &runtimepath.=',~/.vim/bundle/neoterm'")
vim.api.nvim_command("filetype plugin on") -- vim.api.nvim_command("filetype plugin on")
vim.api.nvim_command("filetype plugin indent on") -- vim.api.nvim_command("filetype plugin indent on")
vim.api.nvim_command("syntax on") -- vim.api.nvim_command("syntax on")
-- disable builtin plugins as they are not needed -- disable builtin plugins as they are not needed
local disabled_built_ins = { local disabled_built_ins = {

View file

@ -3,8 +3,6 @@
-- Credit: glepnir -- Credit: glepnir
local lualine = require('lualine') local lualine = require('lualine')
-- Color table for highlights
-- stylua: ignore
local colors = { local colors = {
bg = '#202328', bg = '#202328',
fg = '#bbc2cf', fg = '#bbc2cf',
@ -19,6 +17,7 @@ local colors = {
red = '#ec5f67', red = '#ec5f67',
} }
local conditions = { local conditions = {
buffer_not_empty = function() buffer_not_empty = function()
return vim.fn.empty(vim.fn.expand('%:t')) ~= 1 return vim.fn.empty(vim.fn.expand('%:t')) ~= 1
@ -36,31 +35,37 @@ local conditions = {
-- Config -- Config
local config = { local config = {
options = { options = {
-- Disable sections and component separators
component_separators = '', component_separators = '',
section_separators = '', section_separators = '',
theme = { theme = {
-- We are going to use lualine_c an lualine_x as left and
-- right section. Both are highlighted by c theme . So we normal = {
-- are just setting default looks o statusline c = {
normal = { c = { fg = colors.fg, bg = colors.bg } }, fg = colors.fg,
inactive = { c = { fg = colors.fg, bg = colors.bg } }, bg = colors.bg
}
},
inactive = {
c = {
fg = colors.fg,
bg = colors.bg
}
},
}, },
}, },
sections = { sections = {
-- these are to remove the defaults
lualine_a = {}, lualine_a = {},
lualine_b = {}, lualine_b = {},
lualine_y = {}, lualine_y = {},
lualine_z = {}, lualine_z = {},
-- These will be filled later
lualine_c = {}, lualine_c = {},
lualine_x = {}, lualine_x = {},
}, },
inactive_sections = { inactive_sections = {
-- these are to remove the defaults
lualine_a = {}, lualine_a = {},
lualine_b = {}, lualine_b = {},
lualine_y = {}, lualine_y = {},
@ -70,12 +75,10 @@ local config = {
}, },
} }
-- Inserts a component in lualine_c at left section
local function ins_left(component) local function ins_left(component)
table.insert(config.sections.lualine_c, component) table.insert(config.sections.lualine_c, component)
end end
-- Inserts a component in lualine_x at right section
local function ins_right(component) local function ins_right(component)
table.insert(config.sections.lualine_x, component) table.insert(config.sections.lualine_x, component)
end end
@ -84,19 +87,46 @@ ins_left {
function() function()
return '' return ''
end, end,
color = { fg = colors.blue }, -- Sets highlighting of component
padding = { left = 0, right = 1 }, -- We don't need space before this color = { fg = colors.blue },
padding = {
left = 0,
right = 1
},
} }
ins_left { ins_left {
-- mode component
function() function()
return '' return ''
--return ''
-- local mode_string = {
-- n = 'Normal',
-- i = 'Insert',
-- v = 'Visual',
-- V = 'Visual line',
-- c = 'Change',
-- no = 'dunno1',
-- s = 'dunno2',
-- S = 'dunno3',
-- [''] = 'dunno4',
-- ic = 'dunno5',
-- R = 'dunno6',
-- Rv = 'dunno7',
-- cv = 'dunno8',
-- ce = 'dunno9',
-- r = 'dunno10',
-- rm = 'dunno11',
-- ['r?'] = 'dunno12',
-- ['!'] = 'dunno13',
-- t = 'dunno14',
-- }
-- return mode_string[vim.fn.mode()]
--
end, end,
color = function() color = function()
-- auto change color according to neovims mode
local mode_color = { local mode_color = {
n = colors.blue, n = colors.blue,
i = colors.red, i = colors.red,
@ -127,19 +157,29 @@ ins_left {
ins_left { ins_left {
'branch', 'branch',
icon = '', icon = '',
color = { fg = colors.violet, gui = 'bold' },
color = {
fg = colors.violet,
gui = 'bold'
},
} }
ins_left { ins_left {
'diff', 'diff',
-- Is it me or the symbol for modified us really weird
symbols = { added = '', modified = '󰝤 ', removed = '' }, symbols = {
added = '',
modified = '',
removed = ''
},
diff_color = { diff_color = {
added = { fg = colors.green }, added = { fg = colors.green },
modified = { fg = colors.orange }, modified = { fg = colors.orange },
removed = { fg = colors.red }, removed = { fg = colors.red },
}, },
cond = conditions.hide_in_width, cond = conditions.hide_in_width,
} }
@ -147,8 +187,15 @@ ins_left {
ins_left { ins_left {
'diagnostics', 'diagnostics',
sources = { 'nvim_diagnostic' }, sources = { 'nvim_diagnostic' },
symbols = { error = '', warn = '', info = '' },
symbols = {
error = '',
warn = '',
info = ''
},
diagnostics_color = { diagnostics_color = {
color_error = { fg = colors.red }, color_error = { fg = colors.red },
color_warn = { fg = colors.yellow }, color_warn = { fg = colors.yellow },
@ -156,8 +203,6 @@ ins_left {
}, },
} }
-- Insert mid section. You can make any number of sections in neovim :)
-- for lualine it's any number greater then 2
ins_left { ins_left {
function() function()
return '%=' return '%='
@ -165,24 +210,27 @@ ins_left {
} }
ins_left { ins_left {
'filename', 'filename',
cond = conditions.buffer_not_empty, cond = conditions.buffer_not_empty,
color = { fg = colors.magenta, gui = 'bold' },
color = {
fg = colors.magenta,
gui = 'bold'
},
} }
ins_right { ins_right {
-- filesize component 'filetype',
'filesize', colored = true,
cond = conditions.buffer_not_empty, icon_only = false,
icon = { align = 'right' }
} }
ins_right { ins_right {
'progress', 'progress',
color = { color = {
fg = colors.fg, fg = colors.fg,
gui = 'bold' gui = 'bold'
@ -190,37 +238,39 @@ ins_right {
} }
-- Add components to right sections
ins_right { ins_right {
'o:encoding', -- option component same as &encoding in viml 'o:encoding',
fmt = string.upper, -- I'm not sure why it's upper case either ;)
cond = conditions.hide_in_width,
color = { fg = colors.green, gui = 'bold' },
}
ins_right {
'fileformat',
fmt = string.upper, fmt = string.upper,
icons_enabled = false, -- I think icons are cool but Eviline doesn't have them. sigh cond = conditions.hide_in_width,
color = { color = {
fg = colors.green, fg = colors.green,
gui = 'bold' gui = 'bold'
}, },
} }
ins_right {
'fileformat',
fmt = string.upper,
icons_enabled = false,
color = {
fg = colors.green,
gui = 'bold'
},
}
ins_right { ins_right {
function() function()
return '' return ''
end, end,
color = {
fg = colors.blue color = { fg = colors.blue },
}, padding = { left = 1 },
padding = {
left = 1
},
} }
-- Now don't forget to initialize lualine
lualine.setup(config) lualine.setup(config)

View file

@ -1,7 +1,8 @@
local wilder = require('wilder') local wilder = require('wilder')
wilder.setup({modes = {':', '/', '?'}})
wilder.setup({
modes = {':', '/', '?'}
})
wilder.set_option('renderer', wilder.renderer_mux({ wilder.set_option('renderer', wilder.renderer_mux({
@ -18,7 +19,6 @@ wilder.set_option('renderer', wilder.renderer_mux({
})) }))
wilder.set_option('renderer', wilder.popupmenu_renderer({ wilder.set_option('renderer', wilder.popupmenu_renderer({
highlighter = wilder.basic_highlighter(), highlighter = wilder.basic_highlighter(),
left = {' ', wilder.popupmenu_devicons()}, left = {' ', wilder.popupmenu_devicons()},