Compare commits

...

6 Commits

6 changed files with 59 additions and 15 deletions

1
.gitignore vendored
View File

@@ -8,6 +8,7 @@ config/fzf
config/cheat/cheatsheets/pure-bash-bible/* config/cheat/cheatsheets/pure-bash-bible/*
config/cheat/cheatsheets/tldr/* config/cheat/cheatsheets/tldr/*
config/git/credentials config/git/credentials
config/zsh/.zcompdump
ssh/local.d/* ssh/local.d/*
!ssh/local.d/.gitkeep !ssh/local.d/.gitkeep
!.gitkeep !.gitkeep

View File

@@ -1,3 +1,4 @@
-- luacheck: globals vim
return { return {
-- Configure AstroNvim updates -- Configure AstroNvim updates
updater = { updater = {
@@ -78,6 +79,29 @@ return {
-- augroups/autocommands and custom filetypes also this just pure lua so -- augroups/autocommands and custom filetypes also this just pure lua so
-- anything that doesn't fit in the normal config locations above can go here -- anything that doesn't fit in the normal config locations above can go here
polish = function() polish = function()
local function yaml_ft(path, bufnr)
-- get content of buffer as string
local content = vim.filetype.getlines(bufnr)
if type(content) == "table" then content = table.concat(content, "\n") end
-- check if file is in roles, tasks, or handlers folder
local path_regex = vim.regex "(tasks\\|roles\\|handlers)/"
if path_regex and path_regex:match_str(path) then return "yaml.ansible" end
-- check for known ansible playbook text and if found, return yaml.ansible
local regex = vim.regex "hosts:\\|tasks:"
if regex and regex:match_str(content) then return "yaml.ansible" end
-- return yaml if nothing else
return "yaml"
end
vim.filetype.add {
extension = {
yml = yaml_ft,
yaml = yaml_ft,
},
}
require("notify").setup({ require("notify").setup({
background_colour = "#000000", background_colour = "#000000",
}) })

View File

@@ -17,12 +17,33 @@ return {
end, end,
desc = "Pick to close", desc = "Pick to close",
}, },
-- tables with the `name` key will be registered with which-key if it's installed -- tables with the `name` key will be registered with which-key
-- this is useful for naming menus -- if it's installed this is useful for naming menus
["<leader>b"] = { name = "Buffers" }, ["<leader>b"] = { name = "Buffers" },
-- quick save -- quick save (change description)
-- ["<C-s>"] = { ":w!<cr>", desc = "Save File" }, -- change description but the same command ["<C-s>"] = { ":w!<cr>", desc = "Save File" },
["<leader>P"] = { ":Telescope projects<cr>", desc = "Update Projects listing" }, ["<leader>P"] = {
":Telescope projects<cr>",
desc = "Update Projects listing"
},
-- close_buffers
['<leader>bch'] = {
"<CMD>lua require('close_buffers').delete({type = 'hidden'})<CR>",
desc = "Delete hidden buffers"
},
-- comment-box
["<leader>bb"] = {
"<cmd>lua require('comment-box').lbox()<cr>",
desc = "Left aligned fixed size box with left aligned text"
},
["<leader>bc"] = {
"<cmd>lua require('comment-box').ccbox()<cr>",
desc = "Centered adapted box with centered text"
},
["<leader>bl"] = {
"<cmd>lua require('comment-box').cline()<cr>",
desc = "Centered line"
},
}, },
t = { t = {
-- setting a mapping to false will disable it -- setting a mapping to false will disable it

View File

@@ -1,3 +1,4 @@
-- luacheck: globals vim
return { return {
-- You can also add new plugins here as well: -- You can also add new plugins here as well:
-- Add plugins, the lazy syntax -- Add plugins, the lazy syntax
@@ -21,6 +22,7 @@ return {
mode = "cursor", -- cursor, or topline mode = "cursor", -- cursor, or topline
}, },
}, },
{ "kazhala/close-buffers.nvim" },
{ {
"folke/edgy.nvim", "folke/edgy.nvim",
event = "VeryLazy", event = "VeryLazy",
@@ -48,12 +50,13 @@ return {
end, end,
opts = { opts = {
bottom = { bottom = {
-- toggleterm / lazyterm at the bottom with a height of 40% of the screen -- toggleterm / lazyterm at the bottom with
-- a height of 40% of the screen
{ {
ft = "toggleterm", ft = "toggleterm",
size = { height = 0.4 }, size = { height = 0.4 },
-- exclude floating windows -- exclude floating windows
filter = function(buf, win) filter = function(_, win)
return vim.api.nvim_win_get_config(win).relative == "" return vim.api.nvim_win_get_config(win).relative == ""
end, end,
}, },
@@ -96,11 +99,6 @@ return {
pinned = true, pinned = true,
open = "Neotree position=top buffers", open = "Neotree position=top buffers",
}, },
{
ft = "Outline",
pinned = true,
open = "SymbolsOutlineOpen",
},
-- any other neo-tree windows -- any other neo-tree windows
"neo-tree", "neo-tree",
}, },

View File

@@ -18,7 +18,7 @@ RESET='\033[0m'
# Print time-based personalized message, using figlet & lolcat if availible # Print time-based personalized message, using figlet & lolcat if availible
function welcome_greeting () { function welcome_greeting () {
h=$(date +%H) h=$(date +%H)
if [ "$h" -lt 04 ] || [[ $h -gt 22 ]]; if [ "$h" -lt 04 ] || [ "$h" -gt 22 ];
then greeting="Good Night" then greeting="Good Night"
elif [ "$h" -lt 12 ]; elif [ "$h" -lt 12 ];
then greeting="Good morning" then greeting="Good morning"
@@ -41,7 +41,7 @@ function welcome_greeting () {
function welcome_sysinfo () { function welcome_sysinfo () {
if hash neofetch 2>/dev/null; then if hash neofetch 2>/dev/null; then
neofetch --shell_version off \ neofetch --shell_version off \
--disable kernel distro shell resolution de wm wm_theme theme icons terminal \ --disable kernel distro shell resolution cpu gpu de wm wm_theme theme icons terminal \
--backend off \ --backend off \
--colors 4 8 4 4 8 6 \ --colors 4 8 4 4 8 6 \
--color_blocks off \ --color_blocks off \