diff options
| author | srdusr <trevorgray@srdusr.com> | 2023-11-15 11:04:51 +0200 |
|---|---|---|
| committer | srdusr <trevorgray@srdusr.com> | 2023-11-15 11:04:51 +0200 |
| commit | 6775aea79daae171bf94740335330549c24fabbc (patch) | |
| tree | 2032455dbe11edd4e5b504ecb2a4a7bb6c65482c /.config | |
| parent | b689c502591b7e636a45fca155a77ad16027b286 (diff) | |
| parent | 95b766869be7958967d8cab3463753970168ae33 (diff) | |
| download | dotfiles-6775aea79daae171bf94740335330549c24fabbc.tar.gz dotfiles-6775aea79daae171bf94740335330549c24fabbc.zip | |
Merge commit '95b766869be7958967d8cab3463753970168ae33'
Diffstat (limited to '.config')
| -rw-r--r-- | .config/nvim/lua/plugins/dashboard.lua | 59 | ||||
| -rw-r--r-- | .config/nvim/lua/plugins/hardtime.lua | 2 | ||||
| -rw-r--r-- | .config/nvim/lua/plugins/messages.lua | 85 | ||||
| -rw-r--r-- | .config/nvim/lua/plugins/telescope.lua | 2 | ||||
| -rw-r--r-- | .config/nvim/lua/user/keys.lua | 4 |
5 files changed, 124 insertions, 28 deletions
diff --git a/.config/nvim/lua/plugins/dashboard.lua b/.config/nvim/lua/plugins/dashboard.lua index e25d536..f02242c 100644 --- a/.config/nvim/lua/plugins/dashboard.lua +++ b/.config/nvim/lua/plugins/dashboard.lua @@ -1,4 +1,11 @@ -local db = require("dashboard") +local db = require('dashboard') +local messages = require('plugins.messages') + +function GetRandomMessage() + -- Get a random index from the messages array + local randomIndex = math.random(1, #messages) + return messages[randomIndex] +end --vim.api.nvim_create_autocmd("VimEnter", { -- callback = function() @@ -10,9 +17,9 @@ local db = require("dashboard") --}) db.setup({ - theme = "hyper", + theme = 'hyper', config = { - mru = { limit = 10, label = "" }, + mru = { limit = 10, label = '' }, project = { limit = 10 }, header = { [[ ███╗ ██╗ ███████╗ ██████╗ ██╗ ██╗ ██╗ ███╗ ███╗]], @@ -24,45 +31,47 @@ db.setup({ }, disable_move = false, shortcut = { - { desc = " Plugins", group = "Number", action = "PackerStatus", key = "p" }, + { desc = ' Plugins', group = 'Number', action = 'PackerStatus', key = 'p' }, --{ desc = " Plugins", group = "@property", action = "PackerStatus", key = "p" }, { - desc = " Files", - group = "Number", + desc = ' Files', + group = 'Number', --group = "Label", - action = "Telescope find_files", - key = "f", + action = 'Telescope find_files', + key = 'f', }, { - desc = " Text", - group = "Number", + desc = ' Text', + group = 'Number', --group = "Label", - action = "enew", - key = "t", + action = 'enew', + key = 't', }, { - desc = " Grep", - group = "Number", + desc = ' Grep', + group = 'Number', --group = "Label", - action = "Telescope live_grep", - key = "g", + action = 'Telescope live_grep', + key = 'g', }, { - desc = " Scheme", - group = "Number", + desc = ' Scheme', + group = 'Number', --group = "Label", - action = "Telescope colorscheme", - key = "s", + action = 'Telescope colorscheme', + key = 's', }, { - desc = " Config", - group = "Number", + desc = ' Config', + group = 'Number', --group = "Label", - action = ":edit ~/.config/nvim/init.lua", - key = "c", + action = ':edit ~/.config/nvim/init.lua', + key = 'c', }, }, - footer = { "", "Hello World!" }, + footer = function() + return { '', GetRandomMessage() } + end, }, hide = { statusline = false, diff --git a/.config/nvim/lua/plugins/hardtime.lua b/.config/nvim/lua/plugins/hardtime.lua index 153411d..e058b8b 100644 --- a/.config/nvim/lua/plugins/hardtime.lua +++ b/.config/nvim/lua/plugins/hardtime.lua @@ -12,7 +12,7 @@ end hardtime.setup({ -- hardtime config here - disabled_filetypes = { 'qf', 'netrw', 'NvimTree', 'lazy', 'mason', 'oil', 'dashboard' }, + disabled_filetypes = { 'qf', 'netrw', 'NvimTree', 'NvimTree_1', 'lazy', 'mason', 'oil', 'dashboard' }, }) return { diff --git a/.config/nvim/lua/plugins/messages.lua b/.config/nvim/lua/plugins/messages.lua new file mode 100644 index 0000000..8e46c09 --- /dev/null +++ b/.config/nvim/lua/plugins/messages.lua @@ -0,0 +1,85 @@ +local M = { + 'Why do programmers prefer dark mode? Because light attracts bugs!', + 'Why did the AI break up with its computer? It found someone with better algorithms!', + "Why do Python programmers prefer snakes? Because they can't stand Java!", + 'Why did the developer go to the beach? To catch some rays and debug JavaScript!', + "Why was the HTML document lonely? It didn't have any <body> to share its content with!", + "Why did the CSS file break up with the HTML file? It couldn't stand the layout!", + 'Why do programmers always mix up Christmas and Halloween? Because Oct 31 == Dec 25!', + 'Why did the computer take up gardening? It wanted to improve its root system!', + 'Why do programmers prefer dark chocolate? It has better byte-size!', + "Why did the developer get mad at their computer? It couldn't understand their emotional code!", + 'Why was the JavaScript developer so good at relationships? They knew how to handle callbacks!', + 'Why did the coder go broke? They lost all their cache!', + 'Why did the SQL query go to therapy? It had too many inner joins!', + 'Why did the programmer plant a light bulb? They wanted to grow a power plant!', + 'Why did the computer keep its drink on the windowsill? It wanted a byte!', + "Why don't programmers like nature? It has too many bugs!", + 'Why did the developer go broke? They spent all their money on keyboard shortcuts!', + 'Why did the computer cross the road? To get to the other website!', + 'Why was the code cold? It left its Windows open!', + 'Why did the coder go to therapy? They had too many issues!', + 'Why was the function sad? It returned null!', + "Why did the programmer quit their job? They didn't get arrays!", + 'Why was the loop so fast? It was in a hurry!', + 'Why was the computer cold? It left its Windows open!', + "Why did the developer stay calm during the crisis? Because they knew how to 'handle' exceptions!", + "Why did the JavaScript developer always smile? Because they had 'callbacks' for everything!", + "Why did the programmer break up with their keyboard? It had too many 'commitment' issues!", + "Why don't Neovim users ever get lost in their text files? Because they always 'find' their way!", + "Why don't Neovim users need a GPS? Because they're experts at 'mapping' their routes!", + 'Why did the Neovim user become a musician? Because they can play the keyboard like a pro!', + "Why don't Neovim users ever lose track of time? Because they have a 'status line' to keep them informed!", + "Why did the Neovim user open a detective agency? Because they have an 'eye' for spotting code errors!", + 'Why did the developer bring a ladder to the coding competition? To take their code to the next level!', + "When your code is running slowly: 'It's not a bug; it's a feature that takes its time.'", + "Why did the programmer go to therapy? Because their code had too many 'issues'!", + "Why was the JavaScript developer sad? Because they didn't 'console' their feelings!", + "Why did the developer get locked out of their own codebase? They forgot the 'key'!", + 'Welcome to Neovim, where plugins multiply faster than rabbits!', + "How many programmers does it take to change a lightbulb? None, that's a hardware problem!", + "When you're debugging and can't find the issue: 'I swear, it was working yesterday!'", + "Why don't programmers trust stairs? Because they're always up to 'something'!", + "When you fix a bug without even trying: 'I guess I'm just that good.'", + 'Why was the computer cold? It left its Windows open!', + "Why do Java developers wear glasses? Because they don't C#!", + "Why did the programmer quit their job? They didn't get arrays!", + "When you write a one-liner that solves a complex problem: 'I am a genius, yes, I am.'", + "When you refactor your code and it breaks everything: 'I've made a huge mistake.'", + "When you accidentally close your editor with unsaved changes: 'Goodbye, cruel world.'", + "When you discover a bug on a Friday afternoon: 'Looks like we're working late again.'", + "When you realize your code from last year: 'Who wrote this junk? Oh, wait...'", + "When you write a comment and six months later can't understand it: 'I speak my own language.'", + "When you join a new project with zero documentation: 'Here be dragons.'", + "When you add a 'TODO' comment and hope someone else will deal with it: 'Not my problem.'", + "Remember, coding is not just about writing code; it's about solving problems.", + 'Stay curious and never stop learning. Technology is always evolving.', + "When debugging, don't guess; use systematic troubleshooting techniques.", + "Keep your code DRY (Don't Repeat Yourself) to make it more maintainable.", + 'Use meaningful variable and function names. Your code should read like a story.', + 'Always test your code thoroughly before deploying it. Automated tests are your friends.', + 'Spend time designing your code before jumping into implementation. Good architecture pays off.', + 'Learn to break down complex problems into smaller, manageable tasks.', + "Code with the future in mind. Write code that's easy to understand and maintain.", + 'Version control is your safety net. Use Git or other VCS systems religiously.', + 'Document your code and processes. It will save you and your team countless hours.', + "Don't optimize prematurely. Measure first, then optimize where it matters.", + "Read other people's code. It's a great way to learn different coding styles and techniques.", + 'Stay organized with your project structure. Consistency makes collaboration smoother.', + 'Take regular breaks to prevent burnout. Your productivity will thank you.', + 'Use comments sparingly but effectively. Explain why, not just what.', + 'Consider pair programming or code reviews to catch issues early and learn from others.', + 'Know when to ask for help. Programming is a team effort.', + "Programming is not just about the code; it's about the problem-solving mindset.", + 'Keep your development environment clean and well-maintained for consistent productivity.', + 'Learn from your mistakes and failures; they are valuable lessons in programming.', + 'When faced with a bug, isolate and reproduce it before attempting to fix it.', + "Why did the developer stay calm during the crisis? Because they knew how to 'handle' exceptions.", + "Why was the JavaScript developer always smiling? Because they had 'callbacks' for everything!", + "Why did the programmer break up with their keyboard? It had too many 'commitment' issues!", + "Margaret Hamilton coined the term 'software engineer.'", + 'Why did the function go to therapy? It had too many issues!', + "Why don't programmers like nature? It has too many bugs!", +} + +return M diff --git a/.config/nvim/lua/plugins/telescope.lua b/.config/nvim/lua/plugins/telescope.lua index 481cb7d..e4c62c2 100644 --- a/.config/nvim/lua/plugins/telescope.lua +++ b/.config/nvim/lua/plugins/telescope.lua @@ -75,6 +75,7 @@ require('telescope').setup({ ['<C-x>'] = actions.select_horizontal, ['<C-y>'] = actions.select_vertical, ['<C-t>'] = actions.select_tab, + ['<C-c>'] = actions.delete_buffer, ['<C-u>'] = actions.preview_scrolling_up, ['<C-d>'] = actions.preview_scrolling_down, @@ -110,6 +111,7 @@ require('telescope').setup({ ['<C-x>'] = actions.select_horizontal, ['<C-y>'] = actions.select_vertical, ['<C-t>'] = actions.select_tab, + ['<C-c>'] = actions.delete_buffer, ['<Tab>'] = actions.toggle_selection + actions.move_selection_worse, ['<S-Tab>'] = actions.toggle_selection + actions.move_selection_better, diff --git a/.config/nvim/lua/user/keys.lua b/.config/nvim/lua/user/keys.lua index 64e7cb0..a70eef6 100644 --- a/.config/nvim/lua/user/keys.lua +++ b/.config/nvim/lua/user/keys.lua @@ -6,6 +6,7 @@ local map = function(mode, l, r, opts) keymap.set(mode, l, r, opts) end local term_opts = { noremap = true, silent = false } +local mods = require('user.mods') local bufnr = vim.api.nvim_get_current_buf() -- Semi-colon as leader key @@ -307,7 +308,6 @@ map('n', '<leader>fz', "<cmd>lua require('fzf-lua').files()<CR>") -- Nvim-tree map('n', '<leader>f', '<cmd>Rooter<CR>:NvimTreeToggle<CR>', {}) -map('n', '<leader>F', ':NvimTreeFindFileToggle<CR>', { noremap = false, silent = true }) -- Undotree map('n', '<leader>u', vim.cmd.UndotreeToggle) @@ -446,4 +446,4 @@ map('n', '<leader>rr', '<CMD>lua require("user.mods").toggleCodeRunner()<CR>') map('n', '<leader>rx', ":lua require('user.mods').RunCurrentFile()<CR>:echom 'Running executable file...'<CR>:sl!<CR>:echo ''<CR>") -- Close all floating windows -map('n', '<leader>cw', '<CMD>CloseFloatingWindows<CR>') +map({ 'n', 't', 'c' }, '<leader>w', '<CMD>CloseFloatingWindows<CR>') |
