diff --git a/kitty/kitty.conf b/kitty/kitty.conf index 69a45cc..a3a9db0 100644 --- a/kitty/kitty.conf +++ b/kitty/kitty.conf @@ -1,15 +1,20 @@ include ./theme.conf -font_family PragmataPro Mono Liga -bold_font PragmataPro Mono Liga Bold -italic_font PragmataPro Mono Liga Italic -bold_italic_font PragmataPro Mono Liga Bold Italic +#font_family PragmataPro Mono Liga +#bold_font PragmataPro Mono Liga Bold +#italic_font PragmataPro Mono Liga Italic +#bold_italic_font PragmataPro Mono Liga Bold Italic # font_family Liberation Mono # bold_font Liberation Mono Bold # italic_font Liberation Mono Italic # bold_italic_font Liberation Mono Bold +font_family TerminusTTF +bold_font TerminusTTF-Bold +italic_font TerminusTTF-Italic +bold_italic_font TerminusTTF-Bold-Italic + font_size 12 diff --git a/nvim/.gitignore b/nvim-old/.gitignore similarity index 100% rename from nvim/.gitignore rename to nvim-old/.gitignore diff --git a/nvim-old/init.lua b/nvim-old/init.lua new file mode 100644 index 0000000..f0d2fcc --- /dev/null +++ b/nvim-old/init.lua @@ -0,0 +1,37 @@ +vim.api.nvim_exec( + [[ + autocmd BufRead,BufNewFile *.md set filetype=markdown +]], + false +) + +vim.cmd([[ + autocmd BufRead,BufNewFile *.md set syntax=markdown +]]) + +vim.cmd([[ + highlight link markdownError Normal +]]) + +require("thomas.plugins-setup") +require("thomas.core.options") +require("thomas.core.keymaps") +require("thomas.core.colourscheme") +require("thomas.plugins.lualine") +require("thomas.plugins.telescope") +require("thomas.plugins.nvim-cmp") +require("thomas.plugins.lsp.mason") +require("thomas.plugins.lsp.lspsaga") +require("thomas.plugins.lsp.lspconfig") +require("thomas.plugins.lsp.null-ls") +require("thomas.plugins.autopairs") +require("thomas.plugins.treesitter") +require("thomas.plugins.gitsigns") +require("thomas.plugins.copilot_plugin") +require("thomas.plugins.nvim-tree") +require("thomas.plugins.rainbow-delimiters") +require("thomas.plugins.gitblame") +require("thomas.plugins.zk") +-- require("thomas.plugins.noice") +require("thomas.plugins.obsidian-nvim") +-- require("thomas.plugins.nvim-notify") diff --git a/nvim/lua/thomas/core/colourscheme.lua b/nvim-old/lua/thomas/core/colourscheme.lua similarity index 85% rename from nvim/lua/thomas/core/colourscheme.lua rename to nvim-old/lua/thomas/core/colourscheme.lua index 6c96d70..e10bfce 100644 --- a/nvim/lua/thomas/core/colourscheme.lua +++ b/nvim-old/lua/thomas/core/colourscheme.lua @@ -1,4 +1,4 @@ -local status, _ = pcall(vim.cmd, "colorscheme gruvbox") +local status, _ = pcall(vim.cmd, "colorscheme gruvbox-material") if not status then print("Colorscheme not found!") -- print error if colorscheme not installed return @@ -11,7 +11,7 @@ local function update_hl(group, tbl) vim.api.nvim_set_hl(0, group, new_hl) end -update_hl("Function", { bold = false }) +update_hl("Function", { bold = true }) update_hl("Comment", { italic = false }) update_hl("String", { italic = false }) update_hl("markdownH1", { bold = true }) diff --git a/nvim/lua/thomas/core/keymaps.lua b/nvim-old/lua/thomas/core/keymaps.lua similarity index 100% rename from nvim/lua/thomas/core/keymaps.lua rename to nvim-old/lua/thomas/core/keymaps.lua diff --git a/nvim-old/lua/thomas/core/options.lua b/nvim-old/lua/thomas/core/options.lua new file mode 100644 index 0000000..a3f9ec5 --- /dev/null +++ b/nvim-old/lua/thomas/core/options.lua @@ -0,0 +1,34 @@ +local opt = vim.opt +opt.number = true +opt.showmatch = true +opt.ignorecase = true +opt.smartcase = true +opt.hlsearch = true +opt.incsearch = true +opt.tabstop = 2 +opt.softtabstop = 4 +opt.shiftwidth = 2 +opt.colorcolumn = "80" +opt.textwidth = 80 +opt.clipboard = "unnamedplus" +opt.cursorline = true +opt.background = "dark" +opt.mouse = "" +opt.ttyfast = true +opt.laststatus = 2 +opt.signcolumn = "yes" +opt.swapfile = false +opt.showmode = false +opt.termguicolors = true +opt.wrap = false +opt.formatoptions = "cro" +opt.backspace = "indent,eol,start" +opt.conceallevel = 0 +-- vim.notify = require("notify") +vim.g.gruvbox_material_background = "medium" +vim.g.gruvbox_material_enable_bold = 1 +vim.g.minimap_width = 5 +vim.g.minimap_auto_start = 1 +vim.g.minimap_auto_start_win_enter = 1 +vim.g.minimap_highlight_search = 1 +vim.g.minimap_enable_highlight_colorgroup = 0 diff --git a/nvim/lua/thomas/plugins-setup.lua b/nvim-old/lua/thomas/plugins-setup.lua similarity index 67% rename from nvim/lua/thomas/plugins-setup.lua rename to nvim-old/lua/thomas/plugins-setup.lua index 7e02678..817d920 100644 --- a/nvim/lua/thomas/plugins-setup.lua +++ b/nvim-old/lua/thomas/plugins-setup.lua @@ -1,4 +1,5 @@ -- auto install packer if not installed + local ensure_packer = function() local fn = vim.fn local install_path = fn.stdpath("data") .. "/site/pack/packer/start/packer.nvim" @@ -41,15 +42,17 @@ return packer.startup(function(use) -- "folke/noice.nvim", -- requires = { "MunifTanjim/nui.nvim", "rcarriga/nvim-notify" }, -- }) + use({ "epwalsh/obsidian.nvim", requires = { "nvim-lua/plenary.nvim" } }) - use("ellisonleao/gruvbox.nvim") - use("sainnhe/gruvbox-material") + -- use("ellisonleao/gruvbox.nvim") + use("sainnhe/gruvbox-material") -- use("kdheepak/lazygit.nvim") use("zk-org/zk-nvim") - use("ryanoasis/vim-devicons") + -- use("ryanoasis/vim-devicons") use("tpope/vim-fugitive") use("mechatroner/rainbow_csv") -- use("rcarriga/nvim-notify") + use("lmburns/kimbox") use("tpope/vim-markdown") use("f-person/git-blame.nvim") use("lewis6991/gitsigns.nvim") -- show line modifications on left hand side @@ -62,12 +65,12 @@ return packer.startup(function(use) use("wakatime/vim-wakatime") use("psliwka/vim-smoothie") use("nvim-lua/plenary.nvim") - use("szw/vim-maximizer") + use("szw/vim-maximizer") use("tpope/vim-commentary") - use("tpope/vim-surround") + use("tpope/vim-surround") -- use("vim-scripts/ReplaceWithRegister") use("nvim-tree/nvim-tree.lua") - use("nvim-lualine/lualine.nvim") + use("nvim-lualine/lualine.nvim") -- use({ "nvim-telescope/telescope-fzf-native.nvim", run = "make" }) use({ "nvim-telescope/telescope.nvim", branch = "0.1.x" }) use({ @@ -75,12 +78,16 @@ return packer.startup(function(use) requires = { "nvim-telescope/telescope.nvim", "nvim-lua/plenary.nvim" }, }) -- startup page + --use({ + -- "goolord/alpha-nvim", + -- -- requires = { "nvim-tree/nvim-web-devicons" }, + -- config = function() + -- require("alpha").setup(require("alpha.themes.startify").config) + -- end, + --}) + use({ - "goolord/alpha-nvim", - requires = { "nvim-tree/nvim-web-devicons" }, - config = function() - require("alpha").setup(require("alpha.themes.startify").config) - end, + "lukas-reineke/indent-blankline.nvim", }) -- autocompletion and snippets @@ -98,10 +105,10 @@ return packer.startup(function(use) -- configuring lsp servers use("neovim/nvim-lspconfig") -- easily configure language servers use("hrsh7th/cmp-nvim-lsp") -- for autocompletion - use({ "glepnir/lspsaga.nvim", branch = "main" }) + use({ "glepnir/lspsaga.nvim" }) use("jackguo380/vim-lsp-cxx-highlight") - use("jose-elias-alvarez/typescript.nvim") -- additional functionality for typescript server (e.g. rename file & update imports) + -- use("jose-elias-alvarez/typescript.nvim") -- additional functionality for typescript server (e.g. rename file & update imports) use("onsails/lspkind.nvim") -- vs-code like icons for autocompletion -- formatting and linting @@ -126,25 +133,36 @@ return packer.startup(function(use) ft = { "markdown" }, }) - -- GitHub Copilot - - use({ - "zbirenbaum/copilot.lua", - cmd = "Copilot", - event = "InsertEnter", - config = function() - require("copilot").setup({}) - end, - }) - - use({ - "zbirenbaum/copilot-cmp", - after = { "copilot.lua" }, - config = function() - require("copilot_cmp").setup() - end, - }) if packer_bootstrap then require("packer").sync() end + + local highlight = { + "RainbowRed", + "RainbowYellow", + "RainbowBlue", + "RainbowOrange", + "RainbowGreen", + "RainbowViolet", + "RainbowCyan", + } + + -- local hooks = require("ibl.hooks") + -- -- -- -- create the highlight groups in the highlight setup hook, so they are reset + -- -- -- -- every time the colorscheme changes + -- hooks.register(hooks.type.HIGHLIGHT_SETUP, function() + -- vim.api.nvim_set_hl(0, "RainbowRed", { foreground = "#ea6962" }) + -- vim.api.nvim_set_hl(0, "RainbowYellow", { foreground = "#d8a657" }) + -- vim.api.nvim_set_hl(0, "RainbowBlue", { foreground = "#7daea3" }) + -- vim.api.nvim_set_hl(0, "RainbowOrange", { foreground = "#e78a4e" }) + -- vim.api.nvim_set_hl(0, "RainbowGreen", { foreground = "#a9b665" }) + -- vim.api.nvim_set_hl(0, "RainbowViolet", { foreground = "#d3869b" }) + -- vim.api.nvim_set_hl(0, "RainbowCyan", { foreground = "#89b482" }) + -- end) + + -- vim.g.rainbow_delimiters = { highlight = highlight } + -- require("ibl").setup({ indent = { highlight = highlight } }) + -- hooks.register(hooks.type.SCOPE_HIGHLIGHT, hooks.builtin.scope_highlight_from_extmark) + + -- require("ibl").setup() end) diff --git a/nvim/lua/thomas/plugins/autopairs.lua b/nvim-old/lua/thomas/plugins/autopairs.lua similarity index 100% rename from nvim/lua/thomas/plugins/autopairs.lua rename to nvim-old/lua/thomas/plugins/autopairs.lua diff --git a/nvim/lua/thomas/plugins/copilot_plugin.lua b/nvim-old/lua/thomas/plugins/copilot_plugin.lua similarity index 100% rename from nvim/lua/thomas/plugins/copilot_plugin.lua rename to nvim-old/lua/thomas/plugins/copilot_plugin.lua diff --git a/nvim/lua/thomas/plugins/gitblame.lua b/nvim-old/lua/thomas/plugins/gitblame.lua similarity index 100% rename from nvim/lua/thomas/plugins/gitblame.lua rename to nvim-old/lua/thomas/plugins/gitblame.lua diff --git a/nvim/lua/thomas/plugins/gitsigns.lua b/nvim-old/lua/thomas/plugins/gitsigns.lua similarity index 100% rename from nvim/lua/thomas/plugins/gitsigns.lua rename to nvim-old/lua/thomas/plugins/gitsigns.lua diff --git a/nvim/lua/thomas/plugins/lsp/lspconfig.lua b/nvim-old/lua/thomas/plugins/lsp/lspconfig.lua similarity index 85% rename from nvim/lua/thomas/plugins/lsp/lspconfig.lua rename to nvim-old/lua/thomas/plugins/lsp/lspconfig.lua index b451ed7..dba88a8 100644 --- a/nvim/lua/thomas/plugins/lsp/lspconfig.lua +++ b/nvim-old/lua/thomas/plugins/lsp/lspconfig.lua @@ -37,11 +37,11 @@ end local capabilities = cmp_nvim_lsp.default_capabilities() -- Change the Diagnostic symbols in the sign column (gutter) -local signs = { Error = " ", Warn = "⚠", Hint = " ", Info = "󰙎" } -for type, icon in pairs(signs) do - local hl = "DiagnosticSign" .. type - vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = "" }) -end +-- local signs = { Error = " ", Warn = "⚠", Hint = " ", Info = "󰙎" } +-- for type, icon in pairs(signs) do +-- local hl = "DiagnosticSign" .. type +-- vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = "" }) +-- end -- Hide diagnostic virtual text by default, but toggle visibility with `lead:lh` command vim.diagnostic.config({ @@ -60,8 +60,8 @@ lspconfig["html"].setup({ on_attach = on_attach, }) --- configure typescript server with plugin -typescript.setup({ +--configure typescript server with plugin +lspconfig["ts_ls"].setup({ server = { capabilities = capabilities, on_attach = on_attach, @@ -79,3 +79,9 @@ lspconfig["tailwindcss"].setup({ capabilities = capabilities, on_attach = on_attach, }) + +-- configure python server +lspconfig["pyright"].setup({ + capabilities = capabilities, + on_attach = on_attach, +}) diff --git a/nvim/lua/thomas/plugins/lsp/lspsaga.lua b/nvim-old/lua/thomas/plugins/lsp/lspsaga.lua similarity index 100% rename from nvim/lua/thomas/plugins/lsp/lspsaga.lua rename to nvim-old/lua/thomas/plugins/lsp/lspsaga.lua diff --git a/nvim/lua/thomas/plugins/lsp/mason.lua b/nvim-old/lua/thomas/plugins/lsp/mason.lua similarity index 95% rename from nvim/lua/thomas/plugins/lsp/mason.lua rename to nvim-old/lua/thomas/plugins/lsp/mason.lua index d621c66..85c9ebf 100644 --- a/nvim/lua/thomas/plugins/lsp/mason.lua +++ b/nvim-old/lua/thomas/plugins/lsp/mason.lua @@ -22,13 +22,14 @@ mason_lspconfig.setup({ -- list of servers for mason to install ensure_installed = { "clangd", - "tsserver", + "ts_ls", "html", "cssls", "bashls", "dockerls", "eslint", - "pyre", + -- "pyre", + "pyright", "tailwindcss", "lua_ls", "jsonls", @@ -49,6 +50,7 @@ mason_null_ls.setup({ "black", "pylint", "marksman", + "shfmt", }, automatic_installation = true, diff --git a/nvim/lua/thomas/plugins/lsp/null-ls.lua b/nvim-old/lua/thomas/plugins/lsp/null-ls.lua similarity index 98% rename from nvim/lua/thomas/plugins/lsp/null-ls.lua rename to nvim-old/lua/thomas/plugins/lsp/null-ls.lua index b77ea7d..ebc62dc 100644 --- a/nvim/lua/thomas/plugins/lsp/null-ls.lua +++ b/nvim-old/lua/thomas/plugins/lsp/null-ls.lua @@ -20,6 +20,7 @@ null_ls.setup({ formatting.stylua, -- lua formatter formatting.black, diagnostics.ruff, + diagnostics.shellcheck, -- diagnostics.pylint, diagnostics.eslint_d.with({ -- js/ts linter condition = function(utils) diff --git a/nvim/lua/thomas/plugins/lualine.lua b/nvim-old/lua/thomas/plugins/lualine.lua similarity index 95% rename from nvim/lua/thomas/plugins/lualine.lua rename to nvim-old/lua/thomas/plugins/lualine.lua index fdd3102..8f1ced6 100644 --- a/nvim/lua/thomas/plugins/lualine.lua +++ b/nvim-old/lua/thomas/plugins/lualine.lua @@ -9,7 +9,7 @@ end lualine.setup({ options = { - theme = "gruvbox", + theme = "gruvbox-material", component_separators = { left = "|", right = "|" }, section_separators = { left = " ", right = " " }, }, diff --git a/nvim/lua/thomas/plugins/noice.lua b/nvim-old/lua/thomas/plugins/noice.lua similarity index 100% rename from nvim/lua/thomas/plugins/noice.lua rename to nvim-old/lua/thomas/plugins/noice.lua diff --git a/nvim/lua/thomas/plugins/nvim-cmp.lua b/nvim-old/lua/thomas/plugins/nvim-cmp.lua similarity index 100% rename from nvim/lua/thomas/plugins/nvim-cmp.lua rename to nvim-old/lua/thomas/plugins/nvim-cmp.lua diff --git a/nvim/lua/thomas/plugins/nvim-notify.lua b/nvim-old/lua/thomas/plugins/nvim-notify.lua similarity index 100% rename from nvim/lua/thomas/plugins/nvim-notify.lua rename to nvim-old/lua/thomas/plugins/nvim-notify.lua diff --git a/nvim/lua/thomas/plugins/nvim-tree.lua b/nvim-old/lua/thomas/plugins/nvim-tree.lua similarity index 100% rename from nvim/lua/thomas/plugins/nvim-tree.lua rename to nvim-old/lua/thomas/plugins/nvim-tree.lua diff --git a/nvim/lua/thomas/plugins/obsidian-nvim.lua b/nvim-old/lua/thomas/plugins/obsidian-nvim.lua similarity index 100% rename from nvim/lua/thomas/plugins/obsidian-nvim.lua rename to nvim-old/lua/thomas/plugins/obsidian-nvim.lua diff --git a/nvim-old/lua/thomas/plugins/rainbow-delimiters.lua b/nvim-old/lua/thomas/plugins/rainbow-delimiters.lua new file mode 100644 index 0000000..9b6b5bd --- /dev/null +++ b/nvim-old/lua/thomas/plugins/rainbow-delimiters.lua @@ -0,0 +1,37 @@ +-- import rainbow-delimeters safely +local setup, rd = pcall(require, "rainbow-delimiters.setup") +if not setup then + return +end + +-- rd.setup({ +-- -- change the default colour order +-- -- only use three colours, to match One Dark theme in VSCode +-- highlight = { +-- "RainbowDelimiterRed", +-- "RainbowDelimiterYellow", +-- "RainbowDelimiterBlue", +-- "RainbowDelimiterOrange", +-- "RainbowDelimiterGreen", +-- "RainbowDelimiterViolet", +-- "RainbowDelimiterCyan", +-- }, +-- }) + +-- -- change colour values to match One Dark + +-- vim.api.nvim_set_hl(0, "RainbowDelimiterRed", { foreground = "#89B482" }) +-- vim.api.nvim_set_hl(0, "RainbowDelimiterYellow", { foreground = "#D8A657" }) +-- vim.api.nvim_set_hl(0, "RainbowDelimiterBlue", { foreground = "#7DAEA3" }) +-- vim.api.nvim_set_hl(0, "RainbowDelimiterOrange", { foreground = "#E78A4E" }) +-- vim.api.nvim_set_hl(0, "RainbowDelimiterGreen", { foreground = "#A9B665" }) +-- vim.api.nvim_set_hl(0, "RainbowDelimiterViolet", { foreground = "#D3869B" }) +-- vim.api.nvim_set_hl(0, "RainbowDelimiterCyan", { foreground = "#89B482" }) + +vim.api.nvim_set_hl(0, "RainbowDelimiterRed", { foreground = "#ea6962" }) +vim.api.nvim_set_hl(0, "RainbowDelimiterYellow", { foreground = "#d8a657" }) +vim.api.nvim_set_hl(0, "RainbowDelimiterBlue", { foreground = "#7daea3" }) +vim.api.nvim_set_hl(0, "RainbowDelimiterOrange", { foreground = "#e78a4e" }) +vim.api.nvim_set_hl(0, "RainbowDelimiterGreen", { foreground = "#a9b665" }) +vim.api.nvim_set_hl(0, "RainbowDelimiterViolet", { foreground = "#d3869b" }) +vim.api.nvim_set_hl(0, "RainbowDelimiterCyan", { foreground = "#89b482" }) diff --git a/nvim/lua/thomas/plugins/telescope.lua b/nvim-old/lua/thomas/plugins/telescope.lua similarity index 97% rename from nvim/lua/thomas/plugins/telescope.lua rename to nvim-old/lua/thomas/plugins/telescope.lua index bf605be..9513c8b 100644 --- a/nvim/lua/thomas/plugins/telescope.lua +++ b/nvim-old/lua/thomas/plugins/telescope.lua @@ -20,6 +20,7 @@ telescope.setup({ }, }, file_ignore_patterns = { + "neuron/", "img", "node_modules", ".git", diff --git a/nvim/lua/thomas/plugins/treesitter.lua b/nvim-old/lua/thomas/plugins/treesitter.lua similarity index 98% rename from nvim/lua/thomas/plugins/treesitter.lua rename to nvim-old/lua/thomas/plugins/treesitter.lua index 4c4ba17..ab74f66 100644 --- a/nvim/lua/thomas/plugins/treesitter.lua +++ b/nvim-old/lua/thomas/plugins/treesitter.lua @@ -18,6 +18,7 @@ treesitter.setup({ -- ensure these language parsers are installed ensure_installed = { "c", + "latex", "json", "javascript", "typescript", diff --git a/nvim/lua/thomas/plugins/zk.lua b/nvim-old/lua/thomas/plugins/zk.lua similarity index 100% rename from nvim/lua/thomas/plugins/zk.lua rename to nvim-old/lua/thomas/plugins/zk.lua diff --git a/nvim-old/init.vim b/nvim-oldest/init.vim similarity index 100% rename from nvim-old/init.vim rename to nvim-oldest/init.vim diff --git a/nvim/init.lua b/nvim/init.lua index f0d2fcc..85c540a 100644 --- a/nvim/init.lua +++ b/nvim/init.lua @@ -1,37 +1,4 @@ -vim.api.nvim_exec( - [[ - autocmd BufRead,BufNewFile *.md set filetype=markdown -]], - false -) - -vim.cmd([[ - autocmd BufRead,BufNewFile *.md set syntax=markdown -]]) - -vim.cmd([[ - highlight link markdownError Normal -]]) - -require("thomas.plugins-setup") -require("thomas.core.options") -require("thomas.core.keymaps") -require("thomas.core.colourscheme") -require("thomas.plugins.lualine") -require("thomas.plugins.telescope") -require("thomas.plugins.nvim-cmp") -require("thomas.plugins.lsp.mason") -require("thomas.plugins.lsp.lspsaga") -require("thomas.plugins.lsp.lspconfig") -require("thomas.plugins.lsp.null-ls") -require("thomas.plugins.autopairs") -require("thomas.plugins.treesitter") -require("thomas.plugins.gitsigns") -require("thomas.plugins.copilot_plugin") -require("thomas.plugins.nvim-tree") -require("thomas.plugins.rainbow-delimiters") -require("thomas.plugins.gitblame") -require("thomas.plugins.zk") --- require("thomas.plugins.noice") -require("thomas.plugins.obsidian-nvim") --- require("thomas.plugins.nvim-notify") +require("config.colourscheme") +require("config.options") +require("config.lazy") +require("config.keybindings") diff --git a/nvim/lazy-lock.json b/nvim/lazy-lock.json new file mode 100644 index 0000000..608dce5 --- /dev/null +++ b/nvim/lazy-lock.json @@ -0,0 +1,44 @@ +{ + "LuaSnip": { "branch": "master", "commit": "03c8e67eb7293c404845b3982db895d59c0d1538" }, + "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, + "cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" }, + "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, + "conform.nvim": { "branch": "master", "commit": "278376b953bcab65e2ab9508b5575d1f9a2cbac1" }, + "friendly-snippets": { "branch": "main", "commit": "de8fce94985873666bd9712ea3e49ee17aadb1ed" }, + "git-blame.nvim": { "branch": "master", "commit": "2883a7460f611c2705b23f12d58d398d5ce6ec00" }, + "gitsigns.nvim": { "branch": "main", "commit": "ee7634ab4f0a6606438fe13e16cbf2065589a5ed" }, + "gruvbox-material": { "branch": "master", "commit": "b16dcd787db5ba9302b54ebeac186784c2aed29a" }, + "gv.vim": { "branch": "master", "commit": "b6bb6664e2c95aa584059f195eb3a9f3cb133994" }, + "image.nvim": { "branch": "master", "commit": "88e9693e188b8464b1c426aebb4389fd9db2fcbf" }, + "lazy.nvim": { "branch": "main", "commit": "cf8ecc2c5e4332760431a33534240b0cbc6680ab" }, + "lazygit.nvim": { "branch": "main", "commit": "56760339a81cd1540d5a72fd9d93010a2677b55d" }, + "lspkind.nvim": { "branch": "master", "commit": "a700f1436d4a938b1a1a93c9962dc796afbaef4d" }, + "lspsaga.nvim": { "branch": "main", "commit": "d027f8b9c7c55e26cf4030c8657a2fc8222ed762" }, + "lualine.nvim": { "branch": "master", "commit": "b431d228b7bbcdaea818bdc3e25b8cdbe861f056" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "7446f47b3dfb7df801f31a6f6783c2ad119a6935" }, + "mason-tool-installer.nvim": { "branch": "main", "commit": "c5e07b8ff54187716334d585db34282e46fa2932" }, + "mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" }, + "neo-tree.nvim": { "branch": "v3.x", "commit": "a77af2e764c5ed4038d27d1c463fa49cd4794e07" }, + "neodev.nvim": { "branch": "main", "commit": "46aa467dca16cf3dfe27098042402066d2ae242d" }, + "nui.nvim": { "branch": "main", "commit": "b58e2bfda5cea347c9d58b7f11cf3012c7b3953f" }, + "nvim-autopairs": { "branch": "master", "commit": "ee297f215e95a60b01fde33275cc3c820eddeebe" }, + "nvim-cmp": { "branch": "main", "commit": "29fb4854573355792df9e156cb779f0d31308796" }, + "nvim-colorizer.lua": { "branch": "master", "commit": "a065833f35a3a7cc3ef137ac88b5381da2ba302e" }, + "nvim-lspconfig": { "branch": "master", "commit": "28b205ebe73a18f401e040585106f9bafd8ff21f" }, + "nvim-treesitter": { "branch": "master", "commit": "00d219068385a4aa80859d4606ad6e03af6faa83" }, + "nvim-ts-autotag": { "branch": "main", "commit": "e239a560f338be31337e7abc3ee42515daf23f5e" }, + "nvim-web-devicons": { "branch": "master", "commit": "19d257cf889f79f4022163c3fbb5e08639077bd8" }, + "plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" }, + "rainbow-delimiters.nvim": { "branch": "master", "commit": "d227e6c9879bb50af35cd733461198666981d482" }, + "rainbow_csv": { "branch": "master", "commit": "3dbbfd7d17536aebfb80f571255548495574c32b" }, + "telescope-file-browser.nvim": { "branch": "master", "commit": "626998e5c1b71c130d8bc6cf7abb6709b98287bb" }, + "telescope-fzf-native.nvim": { "branch": "main", "commit": "cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b" }, + "telescope.nvim": { "branch": "master", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" }, + "trouble.nvim": { "branch": "main", "commit": "2f3b537f2207ce32f4459f9d56746ee013b5e01b" }, + "vim-commentary": { "branch": "master", "commit": "64a654ef4a20db1727938338310209b6a63f60c9" }, + "vim-css-color": { "branch": "master", "commit": "950e80352b325ff26d3b0faf95b29e301c200f7d" }, + "vim-fugitive": { "branch": "master", "commit": "d4877e54cef67f5af4f950935b1ade19ed6b7370" }, + "vim-smoothie": { "branch": "master", "commit": "df1e324e9f3395c630c1c523d0555a01d2eb1b7e" }, + "vim-wakatime": { "branch": "master", "commit": "f699e30ca1ba0c7f316847316fd0ba19d3ee51c1" }, + "zk-nvim": { "branch": "main", "commit": "aa9b346f2b0ab0c822bef917ee7f607d5c99f7bc" } +} diff --git a/nvim/lua/config/colourscheme.lua b/nvim/lua/config/colourscheme.lua new file mode 100644 index 0000000..443f0b2 --- /dev/null +++ b/nvim/lua/config/colourscheme.lua @@ -0,0 +1,12 @@ +vim.g.gruvbox_material_background = "medium" +vim.g.gruvbox_material_enable_bold = 1 + +local function update_highlight_group(group, tbl) + local old_hl = vim.api.nvim_get_hl_by_name(group, true) + local new_hl = vim.tbl_extend("force", old_hl, tbl) + vim.api.nvim_set_hl(0, group, new_hl) +end + +update_highlight_group("Function", { bold = false }) +update_highlight_group("Comment", { italic = true }) +update_highlight_group("String", { italic = false }) diff --git a/nvim/lua/config/keybindings.lua b/nvim/lua/config/keybindings.lua new file mode 100644 index 0000000..83cfc22 --- /dev/null +++ b/nvim/lua/config/keybindings.lua @@ -0,0 +1,25 @@ +local keymap = vim.keymap + +-- Search in file +keymap.set("n", "nh", ":nohl") -- clear search highlights + +-- Windows : splits +keymap.set("n", "sv", "v") -- split vertically +keymap.set("n", "sh", "s") -- split horizontally +keymap.set("n", "se", "=") -- make split window equal width +keymap.set("n", "sx", ":close") -- close current split window +keymap.set("n", "mm", ":MaximizerToggle") -- toggle fullscreen of current window + +-- Windows : navigation + +keymap.set("n", "", "h") -- move left +keymap.set("n", "", "j") -- move down +keymap.set("n", "", "k") -- move up +keymap.set("n", "", "l") -- move left + +-- Toggle virtual diagnostics + +keymap.set("n", "lh", function() + local config = vim.diagnostic.config() + vim.diagnostic.config({ virtual_text = not config.virtual_text }) +end) diff --git a/nvim/lua/config/lazy.lua b/nvim/lua/config/lazy.lua new file mode 100644 index 0000000..e803685 --- /dev/null +++ b/nvim/lua/config/lazy.lua @@ -0,0 +1,33 @@ +-- Bootstrap lazy.nvim +local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" +if not (vim.uv or vim.loop).fs_stat(lazypath) then + local lazyrepo = "https://github.com/folke/lazy.nvim.git" + local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) + if vim.v.shell_error ~= 0 then + vim.api.nvim_echo({ + { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, + { out, "WarningMsg" }, + { "\nPress any key to exit..." }, + }, true, {}) + vim.fn.getchar() + os.exit(1) + end +end +vim.opt.rtp:prepend(lazypath) + +-- Make sure to setup `mapleader` and `maplocalleader` before +-- loading lazy.nvim so that mappings are correct. +-- This is also a good place to setup other settings (vim.opt) + +-- Setup lazy.nvim +require("lazy").setup({ + spec = { + -- import your plugins + { import = "plugins" }, + }, + -- Configure any other settings here. See the documentation for more details. + -- colorscheme that will be used when installing plugins. + install = { colorscheme = { "gruvbox" } }, + -- automatically check for plugin updates + checker = { enabled = true }, +}) diff --git a/nvim/lua/thomas/core/options.lua b/nvim/lua/config/options.lua similarity index 74% rename from nvim/lua/thomas/core/options.lua rename to nvim/lua/config/options.lua index 6c5b5e1..ed50790 100644 --- a/nvim/lua/thomas/core/options.lua +++ b/nvim/lua/config/options.lua @@ -1,4 +1,11 @@ +local global = vim.g local opt = vim.opt +local diagnostic = vim.diagnostic + +global.mapleader = ";" +global.maplocalleader = "\\" +global.lazyvim_picker = "telescope" + opt.number = true opt.showmatch = true opt.ignorecase = true @@ -24,6 +31,7 @@ opt.wrap = false opt.formatoptions = "cro" opt.backspace = "indent,eol,start" opt.conceallevel = 0 --- vim.notify = require("notify") --- vim.g.gruvbox_material_background = "medium" -vim.g.gruvbox_material_enable_bold = 0 + +diagnostic.config({ + virtual_text = false, +}) diff --git a/nvim/lua/plugins/autopairs.lua b/nvim/lua/plugins/autopairs.lua new file mode 100644 index 0000000..f2dbc72 --- /dev/null +++ b/nvim/lua/plugins/autopairs.lua @@ -0,0 +1,9 @@ +return { + "windwp/nvim-autopairs", + event = "InsertEnter", + config = function() + require("nvim-autopairs").setup({ + disable_filetype = { "TelescopePrompt", "vim" }, + }) + end, +} diff --git a/nvim/lua/plugins/colorizer.lua b/nvim/lua/plugins/colorizer.lua new file mode 100644 index 0000000..a92caac --- /dev/null +++ b/nvim/lua/plugins/colorizer.lua @@ -0,0 +1,6 @@ +return { + "norcalli/nvim-colorizer.lua", + config = function() + require("colorizer").setup({ "*" }) + end, +} diff --git a/nvim/lua/plugins/completions.lua b/nvim/lua/plugins/completions.lua new file mode 100644 index 0000000..e24288a --- /dev/null +++ b/nvim/lua/plugins/completions.lua @@ -0,0 +1,53 @@ +return { + "hrsh7th/nvim-cmp", + event = "InsertEnter", + dependencies = { + "hrsh7th/cmp-buffer", -- source for text in buffer + "hrsh7th/cmp-path", -- source for file system paths + { + "L3MON4D3/LuaSnip", + version = "v2.*", + -- install jsregexp (optional!). + build = "make install_jsregexp", + dependencies = { "rafamadriz/friendly-snippets" }, + }, + "onsails/lspkind.nvim", -- vs-code like pictograms + }, + config = function() + local cmp = require("cmp") + local lspkind = require("lspkind") + local luasnip = require("luasnip") + + require("luasnip.loaders.from_vscode").lazy_load() + + cmp.setup({ + snippet = { + expand = function(args) + luasnip.lsp_expand(args.body) + end, + }, + mapping = cmp.mapping.preset.insert({ + [""] = cmp.mapping.select_prev_item(), -- previous suggestion + [""] = cmp.mapping.select_next_item(), -- next suggestion + --[""] = cmp.mapping.scroll_docs(-4), + --[""] = cmp.mapping.scroll_docs(4), + [""] = cmp.mapping.complete(), + [""] = cmp.mapping.close(), + [""] = cmp.mapping.confirm({ + behavior = cmp.ConfirmBehavior.Replace, + select = true, + }), + }), + sources = cmp.config.sources({ + { name = "nvim_lsp" }, + { name = "luasnip" }, + { name = "buffer" }, + { name = "path" }, + }), + }) + vim.cmd([[ + set completeopt=menuone,noinsert,noselect + highlight! default link CmpItemKind CmpItemMenuDefault + ]]) + end, +} diff --git a/nvim/lua/plugins/devicons.lua b/nvim/lua/plugins/devicons.lua new file mode 100644 index 0000000..30835e1 --- /dev/null +++ b/nvim/lua/plugins/devicons.lua @@ -0,0 +1 @@ +return { "nvim-tree/nvim-web-devicons" } diff --git a/nvim/lua/plugins/formatter.lua b/nvim/lua/plugins/formatter.lua new file mode 100644 index 0000000..4368415 --- /dev/null +++ b/nvim/lua/plugins/formatter.lua @@ -0,0 +1,36 @@ +return { + "stevearc/conform.nvim", + event = { "BufReadPre", "BufNewFile" }, + config = function() + local conform = require("conform") + + conform.setup({ + formatters_by_ft = { + javascript = { "prettier" }, + typescript = { "prettier" }, + javascriptreact = { "prettier" }, + typescriptreact = { "prettier" }, + css = { "prettier" }, + html = { "prettier" }, + json = { "prettier" }, + yaml = { "prettier" }, + markdown = { "prettier" }, + lua = { "stylua" }, + python = { "isort", "black" }, + }, + format_on_save = { + lsp_fallback = true, + async = false, + timeout_ms = 1000, + }, + }) + + vim.keymap.set({ "n", "v" }, "f", function() + conform.format({ + lsp_fallback = true, + async = false, + timeout_ms = 1000, + }) + end, { desc = "Format file or range (in visual mode)" }) + end, +} diff --git a/nvim/lua/plugins/git-blame.lua b/nvim/lua/plugins/git-blame.lua new file mode 100644 index 0000000..36aeba8 --- /dev/null +++ b/nvim/lua/plugins/git-blame.lua @@ -0,0 +1 @@ +return { "f-person/git-blame.nvim" } diff --git a/nvim/lua/plugins/git-signs.lua b/nvim/lua/plugins/git-signs.lua new file mode 100644 index 0000000..4e201df --- /dev/null +++ b/nvim/lua/plugins/git-signs.lua @@ -0,0 +1 @@ +return { "lewis6991/gitsigns.nvim" } diff --git a/nvim/lua/plugins/git-view.lua b/nvim/lua/plugins/git-view.lua new file mode 100644 index 0000000..620c84f --- /dev/null +++ b/nvim/lua/plugins/git-view.lua @@ -0,0 +1,6 @@ +return { "junegunn/gv.vim", dependencies = { + "tpope/vim-fugitive", + keys = { + { "gv", "GV" }, + }, +} } diff --git a/nvim/lua/plugins/gitsigns.lua b/nvim/lua/plugins/gitsigns.lua new file mode 100644 index 0000000..ac8c597 --- /dev/null +++ b/nvim/lua/plugins/gitsigns.lua @@ -0,0 +1,7 @@ +return { + "lewis6991/gitsigns.nvim", + config = function() + local gitsigns = require("gitsigns") + gitsigns.setup({}) + end, +} diff --git a/nvim/lua/plugins/gruvbox-material.lua b/nvim/lua/plugins/gruvbox-material.lua new file mode 100644 index 0000000..89a7033 --- /dev/null +++ b/nvim/lua/plugins/gruvbox-material.lua @@ -0,0 +1,8 @@ +return { + "sainnhe/gruvbox-material", + lazy = false, + priority = 1000, + config = function() + vim.cmd([[ colorscheme gruvbox-material]]) + end, +} diff --git a/nvim/lua/plugins/lazygit.lua b/nvim/lua/plugins/lazygit.lua new file mode 100644 index 0000000..c0c09f1 --- /dev/null +++ b/nvim/lua/plugins/lazygit.lua @@ -0,0 +1,7 @@ +return { "kdheepak/lazygit.nvim", keys = { + { + "lg", + "LazyGit", + }, +} + } diff --git a/nvim/lua/plugins/lspconfig.lua b/nvim/lua/plugins/lspconfig.lua new file mode 100644 index 0000000..c70d179 --- /dev/null +++ b/nvim/lua/plugins/lspconfig.lua @@ -0,0 +1,76 @@ +return { + "neovim/nvim-lspconfig", + event = { "BufReadPre", "BufNewFile" }, + dependencies = { + "hrsh7th/cmp-nvim-lsp", + { "folke/neodev.nvim", opts = {} }, + }, + config = function() + local nvim_lsp = require("lspconfig") + local mason_lspconfig = require("mason-lspconfig") + local on_attach = function(client, bufnr) + -- format on save + if client.server_capabilities.documentFormattingProvider then + vim.api.nvim_create_autocmd("BufWritePre", { + group = vim.api.nvim_create_augroup("Format", { clear = true }), + buffer = bufnr, + callback = function() + vim.lsp.buf.format() + end, + }) + end + end + + local capabilities = require("cmp_nvim_lsp").default_capabilities() + mason_lspconfig.setup_handlers({ + function(server) + nvim_lsp[server].setup({ + capabilities = capabilities, + }) + end, + ["ts_ls"] = function() + nvim_lsp["ts_ls"].setup({ + on_attach = on_attach, + capabilities = capabilities, + }) + end, + ["cssls"] = function() + nvim_lsp["cssls"].setup({ + on_attach = on_attach, + capabilities = capabilities, + }) + end, + ["html"] = function() + nvim_lsp["html"].setup({ + on_attach = on_attach, + capabilities = capabilities, + }) + end, + ["jsonls"] = function() + nvim_lsp["jsonls"].setup({ + on_attach = on_attach, + capabilities = capabilities, + }) + end, + ["eslint"] = function() + nvim_lsp["eslint"].setup({ + on_attach = on_attach, + capabilities = capabilities, + }) + end, + ["pyright"] = function() + nvim_lsp["pyright"].setup({ + on_attach = on_attach, + capabilities = capabilities, + }) + end, + + ["marksman"] = function() + nvim_lsp["pyright"].setup({ + on_attach = on_attach, + capabilities = capabilities, + }) + end, + }) + end, +} diff --git a/nvim/lua/plugins/lspsaga.lua b/nvim/lua/plugins/lspsaga.lua new file mode 100644 index 0000000..a0fc0ad --- /dev/null +++ b/nvim/lua/plugins/lspsaga.lua @@ -0,0 +1,29 @@ +return { + "nvimdev/lspsaga.nvim", + dependencies = { + "nvim-treesitter/nvim-treesitter", -- optional + "nvim-tree/nvim-web-devicons", -- optional + }, + keys = { + -- { "gf", "Lspsaga lsp_finder" }, + -- { "gd", "Lspsaga peek_definition" }, + -- { "rn", "rn", "Lspsaga rename" }, + -- { "y", "rn", "Lspsaga finder" }, + }, + config = function() + require("lspsaga").setup({ + scroll_preview = { scroll_down = "", scroll_up = "" }, + definition = { + edit = "", + }, + ui = { + colors = { + -- normal_bg = "#022746", + }, + code_action = { + enable = false, + }, + }, + }) + end, +} diff --git a/nvim/lua/plugins/lualine.lua b/nvim/lua/plugins/lualine.lua new file mode 100644 index 0000000..1c07c85 --- /dev/null +++ b/nvim/lua/plugins/lualine.lua @@ -0,0 +1,30 @@ +return { + "nvim-lualine/lualine.nvim", + lazy = false, + dependencies = { "nvim-tree/nvim-web-devicons" }, + opts = { + options = { + theme = "gruvbox-material", + icons_enabled = true, + component_separators = { left = "|", right = "|" }, + section_separators = { left = " ", right = " " }, + }, + sections = { + lualine_c = { + { + "buffers", + show_filename_only = true, + show_modified_status = true, + mode = 3, + filetype_names = { + TelescopePrompt = "Telescope", + }, + }, + { + "filename", + path = 4, + }, + }, + }, + }, +} diff --git a/nvim/lua/plugins/mason.lua b/nvim/lua/plugins/mason.lua new file mode 100644 index 0000000..810ef9d --- /dev/null +++ b/nvim/lua/plugins/mason.lua @@ -0,0 +1,39 @@ +return { + "williamboman/mason.nvim", + dependencies = { + "williamboman/mason-lspconfig.nvim", + "WhoIsSethDaniel/mason-tool-installer.nvim", + }, + config = function() + require("mason").setup() + require("mason-lspconfig").setup({ + automatic_installation = true, + ensure_installed = { + "ts_ls", + "bashls", + "cssls", + "eslint", + "html", + "jsonls", + "pyright", + "lua_ls", + "jsonls", + "yamlls", + "marksman" + }, + }) + + require("mason-tool-installer").setup({ + ensure_installed = { + "prettier", + "stylua", + "isort", + "black", + "pylint", + "eslint_d", + "marksman", + "shfmt" + }, + }) + end, +} diff --git a/nvim/lua/plugins/neotree.lua b/nvim/lua/plugins/neotree.lua new file mode 100644 index 0000000..896f940 --- /dev/null +++ b/nvim/lua/plugins/neotree.lua @@ -0,0 +1,13 @@ +return { + "nvim-neo-tree/neo-tree.nvim", + branch = "v3.x", + dependencies = { + "nvim-lua/plenary.nvim", + "nvim-tree/nvim-web-devicons", + "MunifTanjim/nui.nvim", + "3rd/image.nvim", + }, + keys = { + { "fb", ":Neotree" }, + }, +} diff --git a/nvim/lua/plugins/rainbow-csv.lua b/nvim/lua/plugins/rainbow-csv.lua new file mode 100644 index 0000000..872c9c3 --- /dev/null +++ b/nvim/lua/plugins/rainbow-csv.lua @@ -0,0 +1 @@ +return { "mechatroner/rainbow_csv" } diff --git a/nvim/lua/plugins/rainbow-delimiters.lua b/nvim/lua/plugins/rainbow-delimiters.lua new file mode 100644 index 0000000..fb2853f --- /dev/null +++ b/nvim/lua/plugins/rainbow-delimiters.lua @@ -0,0 +1 @@ +return { "HiPhish/rainbow-delimiters.nvim" } diff --git a/nvim/lua/plugins/telescope.lua b/nvim/lua/plugins/telescope.lua new file mode 100644 index 0000000..9150c2d --- /dev/null +++ b/nvim/lua/plugins/telescope.lua @@ -0,0 +1,33 @@ +local actions = require("telescope.actions") + +return { + "nvim-telescope/telescope.nvim", + tag = "0.1.8", + dependencies = { + "nvim-lua/plenary.nvim", + "nvim-telescope/telescope-fzf-native.nvim", + "nvim-telescope/telescope-file-browser.nvim", + }, + opts = { + defaults = { + mappings = { + i = { + [""] = actions.move_selection_previous, -- move to prev result + [""] = actions.move_selection_next, -- move to next result + }, + }, + file_ignore_patterns = { + "neuron/", + "img", + "node_modules", + ".git", + }, + }, + }, + keys = { + { "ff", "Telescope find_files hidden=true" }, + { "bb", "Telescope buffers" }, + { "tt", "Telescope file_browser hidden=true" }, + { "gg", "Telescope live_grep hidden=true" }, + }, +} diff --git a/nvim/lua/plugins/treesitter.lua b/nvim/lua/plugins/treesitter.lua new file mode 100644 index 0000000..eaecb77 --- /dev/null +++ b/nvim/lua/plugins/treesitter.lua @@ -0,0 +1,58 @@ +return { + "nvim-treesitter/nvim-treesitter", + event = { "BufReadPre", "BufNewFile" }, + build = ":TSUpdate", + dependencies = { + "windwp/nvim-ts-autotag", + }, + config = function() + local treesitter = require("nvim-treesitter.configs") + treesitter.setup({ + highlight = { + enable = true, + additional_vim_regex_highlighting = false, + }, + indent = { enable = true }, + autotag = { + enable = true, + }, + ensure_installed = { + "json", + "javascript", + "typescript", + "tsx", + "yaml", + "html", + "css", + "markdown", + "markdown_inline", + "bash", + "lua", + "vim", + "dockerfile", + "gitignore", + "c", + "python", + }, + incremental_selection = { + enable = true, + keymaps = { + init_selection = "", + node_incremental = "", + scope_incremental = false, + node_decremental = "", + }, + }, + rainbow = { + enable = true, + disable = { "html" }, + extended_mode = false, + max_file_lines = nil, + }, + context_commentstring = { + enable = true, + enable_autocmd = false, + }, + }) + end, +} diff --git a/nvim/lua/plugins/trouble.lua b/nvim/lua/plugins/trouble.lua new file mode 100644 index 0000000..463cbf8 --- /dev/null +++ b/nvim/lua/plugins/trouble.lua @@ -0,0 +1,8 @@ +return { + "folke/trouble.nvim", + opts = {}, + cmd = "Trouble", + keys = { + { "xx", "Trouble diagnostics toggle focus=false" }, + }, +} diff --git a/nvim/lua/plugins/vim-commentary.lua b/nvim/lua/plugins/vim-commentary.lua new file mode 100644 index 0000000..db3b0cf --- /dev/null +++ b/nvim/lua/plugins/vim-commentary.lua @@ -0,0 +1 @@ +return { "tpope/vim-commentary" } diff --git a/nvim/lua/plugins/vim-css-color.lua b/nvim/lua/plugins/vim-css-color.lua new file mode 100644 index 0000000..3bbc359 --- /dev/null +++ b/nvim/lua/plugins/vim-css-color.lua @@ -0,0 +1 @@ +return { "ap/vim-css-color" } diff --git a/nvim/lua/plugins/vim-smoothie.lua b/nvim/lua/plugins/vim-smoothie.lua new file mode 100644 index 0000000..09688e5 --- /dev/null +++ b/nvim/lua/plugins/vim-smoothie.lua @@ -0,0 +1 @@ +return { "psliwka/vim-smoothie" } diff --git a/nvim/lua/plugins/vim-wakatime.lua b/nvim/lua/plugins/vim-wakatime.lua new file mode 100644 index 0000000..0c9070e --- /dev/null +++ b/nvim/lua/plugins/vim-wakatime.lua @@ -0,0 +1 @@ +return { "wakatime/vim-wakatime" } diff --git a/nvim/lua/plugins/zk.lua b/nvim/lua/plugins/zk.lua new file mode 100644 index 0000000..8bb5a5e --- /dev/null +++ b/nvim/lua/plugins/zk.lua @@ -0,0 +1,30 @@ +return { + "zk-org/zk-nvim", + config = function() + require("zk").setup({ + picker = "telescope", + + lsp = { + config = { + cmd = { "zk", "lsp" }, + name = "zk", + }, + + auto_attach = { + enabled = true, + filetypes = { "markdown" }, + }, + }, + }) + end, + keys = { + { + "zk", + "ZkNotes { sort = { 'modified' } }", + }, + { + "zt", + "ZkTags", + }, + }, +} diff --git a/nvim/lua/thomas/plugins/rainbow-delimiters.lua b/nvim/lua/thomas/plugins/rainbow-delimiters.lua deleted file mode 100644 index 41b3c3c..0000000 --- a/nvim/lua/thomas/plugins/rainbow-delimiters.lua +++ /dev/null @@ -1,20 +0,0 @@ --- import rainbow-delimeters safely -local setup, rd = pcall(require, "rainbow-delimiters.setup") -if not setup then - return -end - -rd.setup({ - -- change the default colour order - -- only use three colours, to match One Dark theme in VSCode - highlight = { - "RainbowDelimiterYellow", - "RainbowDelimiterViolet", - "RainbowDelimiterCyan", - }, -}) - --- change colour values to match One Dark -vim.api.nvim_set_hl(0, "RainbowDelimiterViolet", { foreground = "#d3869b" }) -vim.api.nvim_set_hl(0, "RainbowDelimiterYellow", { foreground = "#fabd2f" }) -vim.api.nvim_set_hl(0, "RainbowDelimiterCyan", { foreground = "#fe8019" }) diff --git a/scripts/concat_toggl_sql_date_time.py b/scripts/concat_toggl_sql_date_time.py deleted file mode 100755 index abfcf16..0000000 --- a/scripts/concat_toggl_sql_date_time.py +++ /dev/null @@ -1,61 +0,0 @@ -#! /usr/local/bin/python3 - -import os -import sys -import csv -from datetime import datetime - - -def get_file_size(file_path): - stats = os.stat(file_path) - return stats.st_size - - -def seconds_to_digital_time(seconds): - hours = seconds / 3600 - return round(hours, 2) - - -def convert_to_utc(date: str, time: str) -> str: - datetime_obj = datetime.strptime(f"{date} {time}", "%Y-%m-%d %H:%M:%S") - utc_string = datetime_obj.strftime("%Y%m%dT%H%M%SZ") - return utc_string - -def convert_to_sql_datetime(date, time): - return f"{date} {time}" - -def calculate_decimal_duration(utc1, utc2): - utc1_object = datetime.strptime(utc1, "%Y%m%dT%H%M%SZ") - utc2_object = datetime.strptime(utc2, "%Y%m%dT%H%M%SZ") - - time_difference = utc2_object - utc1_object - difference_seconds = time_difference.total_seconds() - return seconds_to_digital_time(difference_seconds) - - -if __name__ == "__main__": - path = sys.argv[1] - updated_rows = [] - with open(path, mode="r") as csv_file: - reader = csv.DictReader(csv_file) - line = 0 - for row in reader: - if line > 0: - start = convert_to_sql_datetime(row["start_date"], row["start_time"]) - end = convert_to_sql_datetime(row["end_date"], row["end_time"]) - unix_start = convert_to_utc(row["start_date"], row["start_time"]) - unix_end = convert_to_utc(row["end_date"], row["end_time"]) - duration = calculate_decimal_duration(unix_start, unix_end) - updated_rows.append( - [row["activity"], start, end, duration, row["description"]] - ) - line += 1 - print(updated_rows[0]) - print(updated_rows[10]) - print(updated_rows[25]) - with open("updated.csv", mode="w") as updated_file: - writer = csv.writer(updated_file) - for element in updated_rows: - writer.writerow(element) - file_size = get_file_size("./updated.csv") - print(f"Wrote data to new file. Name: updated.csv. Size: {file_size} bytes") diff --git a/scripts/concatenate_date_time.py b/scripts/concatenate_date_time.py deleted file mode 100755 index 7574ba8..0000000 --- a/scripts/concatenate_date_time.py +++ /dev/null @@ -1,54 +0,0 @@ -#! /usr/local/bin/python3 - -import os -import sys -import csv -from datetime import datetime - - -def get_file_size(file_path): - stats = os.stat(file_path) - return stats.st_size - - -def seconds_to_digital_time(seconds): - hours = seconds / 3600 - return round(hours, 2) - - -def convert_to_utc(date: str, time: str) -> str: - datetime_obj = datetime.strptime(f"{date} {time}", "%Y-%m-%d %H:%M:%S") - utc_string = datetime_obj.strftime("%Y%m%dT%H%M%SZ") - return utc_string - - -def calculate_decimal_duration(utc1, utc2): - utc1_object = datetime.strptime(utc1, "%Y%m%dT%H%M%SZ") - utc2_object = datetime.strptime(utc2, "%Y%m%dT%H%M%SZ") - - time_difference = utc2_object - utc1_object - difference_seconds = time_difference.total_seconds() - return seconds_to_digital_time(difference_seconds) - - -if __name__ == "__main__": - path = sys.argv[1] - updated_rows = [] - with open(path, mode="r") as csv_file: - reader = csv.DictReader(csv_file) - line = 0 - for row in reader: - if line > 0: - start = convert_to_utc(row["start_date"], row["start_time"]) - end = convert_to_utc(row["end_date"], row["end_time"]) - duration = calculate_decimal_duration(start, end) - updated_rows.append( - [row["activity"], start, end, duration, row["description"]] - ) - line += 1 - with open("updated.csv", mode="w") as updated_file: - writer = csv.writer(updated_file) - for element in updated_rows: - writer.writerow(element) - file_size = get_file_size("./updated.csv") - print(f"Wrote data to new file. Name: updated.csv. Size: {file_size} bytes") diff --git a/scripts/reset_dns.sh b/scripts/reset_dns.sh new file mode 100755 index 0000000..4b8ed30 --- /dev/null +++ b/scripts/reset_dns.sh @@ -0,0 +1 @@ +sudo systemctl restart systemd-networkd diff --git a/scripts/updated.csv b/scripts/updated.csv deleted file mode 100644 index 6019502..0000000 --- a/scripts/updated.csv +++ /dev/null @@ -1,315 +0,0 @@ -Project,2023-06-29 13:12:29,2023-06-29 14:53:27,1.68,null -Project,2023-06-29 19:15:08,2023-06-29 20:45:31,1.51,null -Project,2023-06-30 08:25:22,2023-06-30 10:02:45,1.62,null -Project,2023-06-30 14:33:03,2023-06-30 15:02:36,0.49,null -Project,2023-07-02 20:16:04,2023-07-02 21:11:24,0.92,null -Project,2023-07-03 06:47:44,2023-07-03 07:33:26,0.76,null -Project,2023-07-05 19:22:47,2023-07-05 19:57:39,0.58,null -Project,2023-07-06 14:14:47,2023-07-06 14:31:15,0.27,null -Blogging,2023-07-07 13:13:12,2023-07-07 14:18:47,1.09,null -Project,2023-07-09 18:31:07,2023-07-09 20:50:30,2.32,null -Study,2023-07-10 11:32:44,2023-07-10 11:59:09,0.44,Arithmetic Logic Unit -Study,2023-07-10 12:09:22,2023-07-10 12:34:23,0.42,Programming Throwdown podcast: origins of the internet -Project,2023-07-10 18:49:14,2023-07-10 20:23:14,1.57,null -Study,2023-07-11 06:57:24,2023-07-11 07:35:54,0.64,revise notes on computer architecture -Study,2023-07-11 07:35:57,2023-07-11 08:00:00,0.4,further notes on ALU -Project,2023-07-11 14:23:56,2023-07-11 14:38:18,0.24,code metrics website integration -Project,2023-07-11 18:55:35,2023-07-11 19:37:36,0.7,pocket api lambda -Study,2023-07-12 06:51:09,2023-07-12 07:45:00,0.9,ALU -Project,2023-07-13 06:56:35,2023-07-13 08:00:00,1.06,pocket api lambda -Project,2023-07-13 13:55:22,2023-07-13 16:05:53,2.18,pocket api lambda -Project,2023-07-13 20:09:56,2023-07-13 20:45:56,0.6,pocket api lambda -Project,2023-07-14 14:07:58,2023-07-14 16:00:00,1.87,pocket api lambda -Project,2023-07-14 20:23:44,2023-07-14 21:15:31,0.86,pocket api lambda -Study,2023-07-15 10:19:40,2023-07-15 11:44:35,1.42,memory -Project,2023-07-15 11:44:39,2023-07-15 12:44:27,1.0,pocket api lambda -Project,2023-07-15 12:47:46,2023-07-15 13:45:00,0.95,code metrics website integration -Project,2023-07-15 17:51:09,2023-07-15 18:27:20,0.6,pocket api lambda -Project,2023-07-16 10:56:44,2023-07-16 12:52:31,1.93,meridian -Project,2023-07-16 20:26:03,2023-07-16 21:25:33,0.99,pocket api lambda -Project,2023-07-17 19:17:16,2023-07-17 19:55:42,0.64,pocket api lambda -Study,2023-07-18 10:06:56,2023-07-18 10:22:58,0.27,python exercises -Project,2023-07-18 11:24:17,2023-07-18 12:32:47,1.14,pocket api lambda -Project,2023-07-18 14:48:54,2023-07-18 17:10:27,2.36,pocket api lambda -Project,2023-07-19 11:56:19,2023-07-19 13:52:24,1.93,pocket api lambda -Project,2023-07-19 14:41:13,2023-07-19 15:40:36,0.99,pocket api lambda -Project,2023-07-19 19:20:19,2023-07-19 20:40:19,1.33,pocket api lambda -Study,2023-07-20 08:41:25,2023-07-20 09:59:17,1.3,memory -Study,2023-07-20 10:36:27,2023-07-20 11:15:00,0.64,memory -Project,2023-07-20 11:57:43,2023-07-20 14:56:41,2.98,pocket api lambda -Project,2023-07-22 12:16:14,2023-07-22 13:29:51,1.23,meridian -Project,2023-07-22 14:22:22,2023-07-22 15:12:23,0.83,meridian -Project,2023-07-22 15:45:43,2023-07-22 18:45:00,2.99,pocket api lambda -Project,2023-07-30 18:58:03,2023-07-30 20:06:46,1.15,meridian -Project,2023-07-31 06:50:05,2023-07-31 07:44:42,0.91,meridian -Project,2023-07-31 21:11:37,2023-07-31 22:00:36,0.82,meridian -Project,2023-08-01 13:43:28,2023-08-01 15:06:31,1.38,meridian -Project,2023-08-02 14:18:33,2023-08-02 15:34:54,1.27,meridian -Project,2023-08-02 19:15:39,2023-08-02 20:38:41,1.38,pocket api lambda -Project,2023-08-02 20:38:57,2023-08-02 21:27:34,0.81,alienblood vscode theme -Project,2023-08-03 21:23:13,2023-08-03 21:34:19,0.18,pocket api lambda -Project,2023-08-04 08:30:00,2023-08-04 09:45:00,1.25,pocket api lambda -Project,2023-08-04 13:35:39,2023-08-04 13:35:42,0.0,meridian -Project,2023-08-04 13:35:44,2023-08-04 15:31:26,1.93,pocket api lambda- -Project,2023-08-06 18:59:41,2023-08-06 19:58:24,0.98,get AWS secret lambda -Project,2023-08-07 06:27:25,2023-08-07 07:41:23,1.23,get AWS secret lambda -Blogging,2023-08-07 19:13:38,2023-08-07 21:00:38,1.78,recommended articles blog post -Blogging,2023-08-08 07:01:13,2023-08-08 08:00:00,0.98,recommended articles blog post -Project,2023-08-08 20:13:06,2023-08-08 21:31:51,1.31,code metrics lambda -Project,2023-08-09 06:55:44,2023-08-09 07:37:15,0.69,code metrics lambda -Project,2023-08-09 19:48:15,2023-08-09 21:17:43,1.49,code metrics lambda -Project,2023-08-14 06:45:00,2023-08-14 08:00:00,1.25,alienblood vscode theme -Project,2023-08-14 18:55:55,2023-08-14 20:00:55,1.08,meridian -Project,2023-08-15 06:30:55,2023-08-15 06:47:03,0.27,meridian -Project,2023-08-15 07:13:03,2023-08-15 07:37:22,0.41,google sheets lambda -Exercise,2023-08-15 13:33:58,2023-08-15 14:30:00,0.93,python exercises -Exercise,2023-08-15 17:40:12,2023-08-15 17:53:10,0.22,python exercises -Exercise,2023-08-15 18:45:07,2023-08-15 19:56:48,1.19,python exercises -Project,2023-08-15 19:58:27,2023-08-15 21:08:45,1.17,meridian -Project,2023-08-16 08:30:27,2023-08-16 09:45:00,1.24,meridian -Project,2023-08-16 20:20:45,2023-08-16 21:36:28,1.26,meridian -Project,2023-08-17 18:30:33,2023-08-17 21:16:35,2.77,meridian -Study,2023-08-18 10:39:44,2023-08-18 12:33:21,1.89,python imports -Study,2023-08-18 19:55:57,2023-08-18 20:17:29,0.36,python imports -Exercise,2023-08-20 17:46:05,2023-08-20 19:46:23,2.0,python exercises -Project,2023-08-20 20:30:52,2023-08-20 22:24:03,1.89,create lambdas monorepo -Project,2023-08-21 06:55:00,2023-08-21 08:00:00,1.08,create lambdas monorepo -Project,2023-08-21 13:43:12,2023-08-21 14:39:26,0.94,create lambdas monorepo -Project,2023-08-21 18:28:45,2023-08-21 19:32:45,1.07,meridian -Project,2023-08-21 19:32:51,2023-08-21 19:55:28,0.38,google sheets lambda -Study,2023-08-21 20:50:04,2023-08-21 21:30:44,0.68,memory addresses -Project,2023-08-22 15:01:53,2023-08-22 16:25:38,1.4,google sheets lambda -Project,2023-08-23 16:01:49,2023-08-23 17:58:13,1.94,google sheets lambda -Blogging,2023-08-23 20:36:01,2023-08-23 21:12:37,0.61,updating blogs -Blogging,2023-08-23 21:12:39,2023-08-23 21:24:12,0.19,updating blogs -Project,2023-08-24 12:53:33,2023-08-24 13:22:01,0.47,google sheets lambda -Project,2023-08-24 20:24:11,2023-08-24 21:02:11,0.63,google sheets lambda -Study,2023-08-25 07:03:07,2023-08-25 08:00:00,0.95,memory addresses -Project,2023-08-25 10:13:03,2023-08-25 14:18:00,4.08,google sheets lambda -Project,2023-08-26 13:50:28,2023-08-26 15:57:55,2.12,google sheets lambda -Project,2023-08-27 20:12:32,2023-08-27 21:18:32,1.1,google sheets lambda -Study,2023-08-28 08:36:40,2023-08-28 09:30:00,0.89,python lambdas -Project,2023-08-28 10:10:45,2023-08-28 12:19:23,2.14,google sheets lambda -Project,2023-08-28 15:18:13,2023-08-28 17:00:00,1.7,google sheets lambda -Project,2023-08-28 18:57:11,2023-08-28 20:27:34,1.51,google sheets lambda -Project,2023-08-30 09:38:06,2023-08-30 10:38:09,1.0,save articles lambda -Project,2023-08-30 17:44:15,2023-08-30 18:37:50,0.89,save articles lambda -Project,2023-08-30 20:28:12,2023-08-30 21:00:12,0.53,save articles lambda -Study,2023-08-31 19:44:28,2023-08-31 20:45:00,1.01,list and dictionary methods -Study,2023-09-01 08:00:12,2023-09-01 09:45:38,1.76,improve python notes -Study,2023-09-04 07:00:28,2023-09-04 07:34:28,0.57,improve python notes -Project,2023-09-04 07:34:46,2023-09-04 08:14:34,0.66,save articles lambda -Project,2023-09-04 14:00:00,2023-09-04 16:15:00,2.25,save articles lambda -Study,2023-09-05 08:00:09,2023-09-05 08:45:53,0.76,list comprehension in python -Project,2023-09-08 08:00:00,2023-09-08 14:30:00,6.5,exlibris lambda -Project,2023-09-10 11:15:00,2023-09-10 18:30:00,7.25,exlibris lambda -Project,2023-09-11 07:15:00,2023-09-11 08:15:00,1.0,exlibris lambda -Study,2023-09-11 18:16:15,2023-09-11 18:41:49,0.43,improve python notes -Blogging,2023-09-11 18:42:07,2023-09-11 19:27:04,0.75,systems obscure color scheme -Blogging,2023-09-12 07:00:00,2023-09-12 08:15:00,1.25,systems obscure color scheme -Blogging,2023-09-12 13:33:26,2023-09-12 15:00:00,1.44,systems obscure color scheme -Study,2023-09-13 07:32:16,2023-09-13 08:45:00,1.21,list comprehension in python -Project,2023-09-18 19:00:00,2023-09-18 20:15:00,1.25,refactor saved-articles-lambda -Study,2023-09-19 07:21:39,2023-09-19 09:00:00,1.64,testing in python -Project,2023-09-19 20:39:03,2023-09-19 21:06:48,0.46,refactor saved-articles-lambda -Study,2023-09-20 14:09:06,2023-09-20 15:00:00,0.85,testing in python -Project,2023-09-20 19:00:28,2023-09-20 22:09:07,3.14,refactor saved-articles-lambda -Project,2023-09-21 19:09:38,2023-09-21 21:09:50,2.0,add tests pocket lambda -Blogging,2023-09-21 21:10:02,2023-09-21 21:39:54,0.5,pytest blog post -Blogging,2023-09-22 10:15:33,2023-09-22 10:30:05,0.24,pytest blog post -Project,2023-09-22 10:30:35,2023-09-22 13:11:48,2.69,refactor saved-articles-lambda -Project,2023-09-22 13:34:18,2023-09-22 13:55:56,0.36,refactor saved-articles-lambda -Project,2023-09-22 13:55:59,2023-09-22 15:25:20,1.49,add tests pocket lambda -Project,2023-09-23 12:00:02,2023-09-23 15:38:21,3.64,add tests pocket lambda -Project,2023-09-23 15:49:58,2023-09-23 16:28:37,0.64,toggl lambda -Project,2023-09-23 17:42:21,2023-09-23 18:24:16,0.7,toggl lambda -Project,2023-09-24 18:54:10,2023-09-24 22:36:30,3.71,toggl lambda -Project,2023-09-25 07:00:00,2023-09-25 07:53:54,0.9,toggl lambda -Project,2023-09-25 18:26:56,2023-09-25 21:30:10,3.05,toggl lambda -Blogging,2023-09-25 21:30:25,2023-09-25 21:37:28,0.12,systems obscure tweaks -Blogging,2023-09-26 13:41:32,2023-09-26 15:00:49,1.32,systems obscure tweaks -Study,2023-09-26 18:40:14,2023-09-26 20:26:05,1.76,Jest testing -Project,2023-09-26 20:52:29,2023-09-26 22:04:50,1.21,toggl lambda -Project,2023-09-27 06:51:36,2023-09-27 07:55:46,1.07,toggl lambda -Project,2023-09-27 20:26:10,2023-09-27 21:45:10,1.32,toggl lambda -Study,2023-09-28 07:03:21,2023-09-28 08:00:00,0.94,exception handling in Python -Study,2023-09-29 07:56:33,2023-09-29 08:15:24,0.31,technical articles -Study,2023-09-29 08:15:39,2023-09-29 09:42:48,1.45,pytest -Project,2023-09-29 09:42:56,2023-09-29 10:38:13,0.92,refactor saved-articles-lambda -Project,2023-09-29 11:00:00,2023-09-29 15:45:00,4.75,refactor saved-articles-lambda -Project,2023-10-01 17:43:02,2023-10-01 18:00:00,0.28,refactor saved-articles-lambda -Project,2023-10-01 18:55:45,2023-10-01 21:22:06,2.44,refactor saved-articles-lambda -Blogging,2023-10-03 20:00:00,2023-10-03 21:15:00,1.25,error handling blog post -Study,2023-10-05 19:35:20,2023-10-05 21:15:00,1.66,Jest testing -Project,2023-10-05 21:15:00,2023-10-05 22:00:00,0.75,refactor saved-articles-lambda -Project,2023-10-06 16:19:46,2023-10-06 17:30:00,1.17,refactor saved-articles-lambda -Project,2023-10-06 18:26:06,2023-10-06 19:38:19,1.2,refactor saved-articles-lambda -Study,2023-10-13 09:12:45,2023-10-13 11:27:29,2.25,memory -Exercise,2023-10-13 11:27:43,2023-10-13 12:15:00,0.79,advent of code python -Exercise,2023-10-15 16:02:50,2023-10-15 17:18:11,1.26,advent of code python -Study,2023-10-15 17:18:28,2023-10-15 17:32:55,0.24,typehinting python -Project,2023-10-15 19:55:16,2023-10-15 21:17:20,1.37,refactor saved-articles-lambda -Study,2023-10-16 06:30:35,2023-10-16 06:58:35,0.47,CPU -Project,2023-10-16 07:03:29,2023-10-16 08:00:00,0.94,activities lambda -Blogging,2023-10-16 17:20:58,2023-10-16 18:11:58,0.85,systems obscure edits -Project,2023-10-19 15:34:03,2023-10-19 15:38:59,0.08,refactor saved-articles-lambda -Project,2023-10-19 15:39:01,2023-10-19 17:33:51,1.91,activities lambda -Study,2023-10-20 10:30:27,2023-10-20 12:00:00,1.49,AWS step functions -Project,2023-10-20 13:35:09,2023-10-20 14:59:32,1.41,activities lambda -Project,2023-10-20 18:23:18,2023-10-20 20:01:35,1.64,activities lambda -Project,2023-10-22 17:31:16,2023-10-22 19:24:31,1.89,activities lambda -Study,2023-10-23 06:46:31,2023-10-23 06:56:52,0.17,CPU -Project,2023-10-23 06:56:54,2023-10-23 07:29:59,0.55,activities lambda -Project,2023-10-23 20:26:55,2023-10-23 21:05:54,0.65,activities lambda -Study,2023-10-24 07:26:30,2023-10-24 08:15:30,0.82,CPU -Project,2023-10-24 19:26:03,2023-10-24 20:35:42,1.16,activities lambda -Project,2023-10-26 18:00:00,2023-10-26 19:45:00,1.75,activities lambda -Study,2023-10-27 08:02:41,2023-10-27 09:00:00,0.96,aws open search -Blogging,2023-10-27 10:48:46,2023-10-27 12:22:21,1.56,Jest blog post -Project,2023-10-27 18:47:44,2023-10-27 19:59:02,1.19,activities lambda -Project,2023-10-30 17:54:40,2023-10-30 19:08:13,1.23,refactor saved-articles-lambda -Blogging,2023-10-30 19:08:23,2023-10-30 20:30:23,1.37,systems obscure style changes -Blogging,2023-10-31 16:30:00,2023-10-31 17:30:00,1.0,blog on Jest routines -Project,2023-11-01 16:00:00,2023-11-01 18:00:00,2.0,refactor saved-articles-lambda -Project,2023-11-02 17:30:00,2023-11-02 18:15:00,0.75,refactor saved-articles-lambda -Study,2023-11-02 18:29:31,2023-11-02 19:35:29,1.1,pytest -Project,2023-11-02 19:46:24,2023-11-02 20:45:00,0.98,refactor saved-articles-lambda -Project,2023-11-03 08:56:09,2023-11-03 11:30:00,2.56,refactor saved-articles-lambda -Project,2023-11-03 12:38:24,2023-11-03 14:11:30,1.55,refactor saved-articles-lambda -Blogging,2023-11-05 14:22:48,2023-11-05 15:15:00,0.87,blog on Jest routines -Project,2023-11-05 17:32:23,2023-11-05 19:44:08,2.2,refactore code metrics lambda -Blogging,2023-11-06 16:47:46,2023-11-06 17:24:11,0.61,blog on Jest routines -Project,2023-11-06 18:38:51,2023-11-06 19:34:11,0.92,refactore code metrics lambda -Project,2023-11-08 18:32:58,2023-11-08 19:36:03,1.05,add fetch client to lambdas -Project,2023-11-09 17:00:00,2023-11-09 18:00:00,1.0,add fetch client to lambdas -Project,2023-11-10 09:58:06,2023-11-10 10:58:33,1.01,add fetch client to lambdas -Project,2023-11-10 10:58:45,2023-11-10 11:52:36,0.9,refactor code-metrics-lambda -Project,2023-11-13 18:30:00,2023-11-13 20:11:16,1.69,refactor code-metrics-lambda -Project,2023-11-14 17:39:00,2023-11-14 17:56:34,0.29,refactor code-metrics-lambda -Project,2023-11-16 17:18:37,2023-11-16 17:38:47,0.34,refactor code-metrics-lambda -Project,2023-11-16 17:38:58,2023-11-16 20:19:14,2.67,refactor code metrics FE -Project,2023-11-16 20:44:19,2023-11-16 21:10:56,0.44,refactor code metrics FE -Project,2023-11-17 10:14:36,2023-11-17 16:22:53,6.14,refactor code metrics FE -Project,2023-11-17 16:22:55,2023-11-17 19:01:04,2.64,refactor code-metrics-lambda -Project,2023-11-19 19:08:45,2023-11-19 20:15:45,1.12,refactor code metrics FE -Blogging,2023-11-20 17:30:17,2023-11-20 19:30:37,2.01,jest parameterization post -Blogging,2023-11-21 17:00:48,2023-11-21 19:27:38,2.45,jest parameterization post -Project,2023-11-23 18:00:46,2023-11-23 19:46:46,1.77,lambda mono repo chores -Blogging,2023-11-23 20:47:27,2023-11-23 21:13:06,0.43,improving past blog posts -Project,2023-11-24 10:20:28,2023-11-24 11:07:30,0.78,lambda mono repo chores -Project,2023-11-27 18:05:35,2023-11-27 19:12:55,1.12,lambda mono repo chores -Project,2023-11-28 18:33:49,2023-11-28 19:22:09,0.81,refactor code-metrics-lambda -Project,2023-11-29 17:11:09,2023-11-29 18:37:24,1.44,refactor code metrics FE -Project,2023-11-30 16:30:12,2023-11-30 18:48:33,2.31,refactor code-metrics-lambda -Project,2023-12-04 15:10:56,2023-12-04 16:15:00,1.07,refactor code-metrics-lambda -Project,2023-12-07 20:46:12,2023-12-07 21:48:45,1.04,refactor code metrics FE -Exercise,2023-12-08 18:45:00,2023-12-08 19:52:59,1.13,advent of code -Project,2023-12-10 18:27:39,2023-12-10 19:28:24,1.01,refactor code metrics FE -Project,2023-12-11 17:08:14,2023-12-11 17:51:13,0.72,refactor code metrics FE -Exercise,2023-12-11 18:13:16,2023-12-11 19:03:00,0.83,advent of code -Exercise,2023-12-12 12:00:00,2023-12-12 13:00:00,1.0,advent of code -Exercise,2023-12-12 16:41:39,2023-12-12 16:58:12,0.28,advent of code -Exercise,2023-12-12 21:00:28,2023-12-12 21:30:28,0.5,advent of code -Exercise,2023-12-13 09:00:00,2023-12-13 10:00:00,1.0,advent of code -Project,2023-12-14 20:17:20,2023-12-14 20:50:12,0.55,refactor code metrics FE -Project,2023-12-15 18:15:39,2023-12-15 19:13:52,0.97,refactor code metrics FE -Project,2023-12-17 16:36:33,2023-12-17 19:42:23,3.1,refactor code metrics FE -Project,2023-12-17 20:23:25,2023-12-17 20:23:27,0.0,refactor code metrics FE -Project,2023-12-18 16:40:11,2023-12-18 18:30:38,1.84,refactor code metrics FE -Exercise,2023-12-18 20:39:50,2023-12-18 21:16:39,0.61,advent of code (python) -Exercise,2023-12-19 17:26:17,2023-12-19 18:20:52,0.91,advent of code (python) -Project,2023-12-19 18:22:12,2023-12-19 18:44:42,0.38,refactor code metrics FE -Project,2023-12-20 16:22:32,2023-12-20 18:00:32,1.63,refactor code metrics FE -Project,2023-12-21 18:22:26,2023-12-21 19:58:06,1.59,refactor code metrics FE -Project,2023-12-22 13:21:55,2023-12-22 13:42:10,0.34,refactor code metrics FE -Project,2023-12-26 19:45:41,2023-12-26 20:58:23,1.21,refactor code metrics FE -Exercise,2023-12-27 11:22:23,2023-12-27 12:34:55,1.21,advent of code (python) -Exercise,2023-12-27 12:37:21,2023-12-27 12:48:08,0.18,advent of code (python) -Project,2023-12-27 14:55:36,2023-12-27 15:48:00,0.87,refactor code metrics FE -Project,2023-12-27 17:21:34,2023-12-27 21:21:34,4.0,refactor code metrics FE -Exercise,2023-12-28 10:30:32,2023-12-28 11:45:00,1.24,advent of code (python) -Project,2023-12-28 13:31:03,2023-12-28 14:45:18,1.24,refactor code metrics FE -Project,2023-12-30 17:00:34,2023-12-30 18:25:34,1.42,refactor code metrics FE -Blogging,2023-12-30 18:27:47,2023-12-30 18:32:22,0.08,Meridian project update -Project,2023-12-30 18:32:25,2023-12-30 18:37:19,0.08,refactor code metrics FE -Exercise,2023-12-31 14:43:51,2023-12-31 15:51:46,1.13,advent of code (python) -Project,2023-12-31 16:25:19,2023-12-31 17:47:15,1.37,refactor code metrics FE -Exercise,2024-01-01 14:41:29,2024-01-01 15:42:02,1.01,advent of code (python) -Project,2024-01-01 17:28:01,2024-01-01 18:00:04,0.53,refactor code metrics FE -Study,2024-01-02 16:42:49,2024-01-02 18:19:33,1.61,multiple pointer routines in python -Exercise,2024-01-03 16:51:57,2024-01-03 19:02:00,2.17,advent of code (python) -Exercise,2024-01-04 16:46:37,2024-01-04 17:10:37,0.4,advent of code (python) -Project,2024-01-04 17:10:41,2024-01-04 17:39:48,0.49,refactor code metrics FE -Project,2024-01-05 12:44:59,2024-01-05 15:41:01,2.93,refactor code metrics FE -Project,2024-01-07 17:33:32,2024-01-07 18:28:03,0.91,refactor code metrics FE -Project,2024-01-08 17:00:31,2024-01-08 18:43:15,1.71,deploy updated lambdas -Project,2024-01-09 15:36:12,2024-01-09 17:54:05,2.3,deploy updated lambdas -Project,2024-01-09 18:01:08,2024-01-09 18:33:35,0.54,deploy updated lambdas -Project,2024-01-10 16:22:36,2024-01-10 17:38:54,1.27,refactor code metrics FE -Project,2024-01-10 17:39:05,2024-01-10 17:59:32,0.34,neovim configuration -Project,2024-01-11 14:39:33,2024-01-11 18:32:25,3.88,neovim configuration -Project,2024-01-12 09:09:07,2024-01-12 10:54:19,1.75,neovim configuration -Project,2024-01-12 13:40:42,2024-01-12 17:31:57,3.85,neovim configuration -Project,2024-01-13 12:54:32,2024-01-13 17:30:00,4.59,neovim configuration -Project,2024-01-14 15:59:09,2024-01-14 19:07:21,3.14,neovim configuration -Project,2024-01-16 13:26:31,2024-01-16 13:40:25,0.23,neovim configuration -Project,2024-01-16 17:57:52,2024-01-16 19:15:50,1.3,neovim configuration -Project,2024-01-17 19:39:20,2024-01-17 20:49:36,1.17,neovim configuration -Project,2024-01-19 14:00:00,2024-01-19 21:00:00,7.0,neovim configuration -Project,2024-01-20 09:00:00,2024-01-20 11:45:00,2.75,neovim configuration -Project,2024-01-20 12:22:33,2024-01-20 15:43:23,3.35,neovim configuration -Project,2024-01-20 16:20:58,2024-01-20 18:33:12,2.2,neovim configuration -Project,2024-01-21 10:58:38,2024-01-21 15:55:15,4.94,neovim configuration -Project,2024-01-22 18:05:59,2024-01-22 18:55:43,0.83,neovim configuration -Project,2024-01-23 16:47:22,2024-01-23 18:19:15,1.53,neovim configuration -Project,2024-01-25 14:42:51,2024-01-25 16:04:11,1.36,neovim configuration -Project,2024-01-26 18:35:24,2024-01-26 20:02:24,1.45,linux ricing -Project,2024-01-27 16:28:00,2024-01-27 19:43:00,3.25,linux ricing -Project,2024-01-28 07:00:00,2024-01-28 14:00:00,7.0,linux ricing -Project,2024-01-30 16:00:00,2024-01-30 20:00:00,4.0,linux ricing -Project,2024-01-31 17:00:00,2024-01-31 19:15:00,2.25,linux ricing -Project,2024-01-31 19:55:34,2024-01-31 20:11:34,0.27,linux ricing -Project,2024-02-01 19:54:16,2024-02-01 21:29:14,1.58,linux ricing -Project,2024-02-02 09:00:00,2024-02-02 14:00:00,5.0,linux ricing -Exercise,2024-02-02 16:34:49,2024-02-02 17:29:47,0.92,python advent of code -Project,2024-02-03 13:44:19,2024-02-03 16:00:19,2.27,linux ricing -Project,2024-02-04 11:55:28,2024-02-04 12:27:34,0.54,linux ricing -Project,2024-02-04 12:27:58,2024-02-04 13:19:28,0.86,"add ""tools"" pocket spreadsheet" -Project,2024-02-04 13:19:37,2024-02-04 14:02:05,0.71,create waybar wakatime widget -Project,2024-02-04 16:37:36,2024-02-04 17:18:48,0.69,create waybar wakatime widget -Project,2024-02-04 19:27:41,2024-02-04 20:25:39,0.97,create waybar wakatime widget -Project,2024-02-06 19:38:28,2024-02-06 21:00:28,1.37,create waybar wakatime widget -Project,2024-02-07 17:42:26,2024-02-07 19:05:08,1.38,create waybar wakatime widget -Project,2024-02-09 16:27:38,2024-02-09 20:33:58,4.11,create waybar Toggl widget -Project,2024-02-10 10:09:30,2024-02-10 11:12:52,1.06,create waybar Toggl widget -Project,2024-02-10 15:05:32,2024-02-10 15:44:30,0.65,create waybar Toggl widget -Project,2024-02-10 16:15:25,2024-02-10 17:02:44,0.79,linux ricing -Project,2024-02-13 15:37:53,2024-02-13 18:56:47,3.31,create waybar Toggle widget -Study,2024-02-13 19:33:37,2024-02-13 20:36:16,1.04,research Zettelkasten -Project,2024-02-14 16:57:50,2024-02-14 17:05:00,0.12,create waybar Toggl widget -Project,2024-02-14 17:05:30,2024-02-14 17:21:05,0.26,create waybar Toggl widget -Project,2024-02-14 17:26:55,2024-02-14 17:43:51,0.28,create waybar Toggl widget -Study,2024-02-14 19:12:13,2024-02-14 20:21:35,1.16,research Zettelkasten -Project,2024-02-17 12:04:26,2024-02-17 18:05:24,6.02,configuring Zettelkasten -Project,2024-02-20 19:03:23,2024-02-20 20:00:02,0.94,create waybar Toggle widget -Project,2024-02-21 17:10:23,2024-02-21 20:38:29,3.47,linux ricing -Project,2024-02-22 16:15:00,2024-02-22 19:00:00,2.75,linux ricing -Project,2024-02-23 12:45:00,2024-02-23 15:15:00,2.5,linux ricing -Project,2024-02-23 15:40:37,2024-02-23 15:49:17,0.14,fix graph rendering on blog -Project,2024-02-23 17:52:47,2024-02-23 18:42:34,0.83,fix graph rendering on blog -Project,2024-02-25 16:40:25,2024-02-25 17:43:19,1.05,autosave eolas -Project,2024-02-26 17:02:12,2024-02-26 17:50:25,0.8,autosave eolas -Project,2024-02-26 18:59:54,2024-02-26 20:00:47,1.01,autosave eolas -Project,2024-02-27 18:09:14,2024-02-27 18:36:40,0.46,configure lock screen for hyprland -Study,2024-02-27 18:45:00,2024-02-27 19:45:00,1.0,watch video on C -Project,2024-02-27 19:51:04,2024-02-27 20:39:05,0.8,configure lock screen for hyprland -Project,2024-02-28 16:27:13,2024-02-28 20:19:08,3.87,configure lock screen for hyprland -Study,2024-02-29 17:22:12,2024-02-29 18:00:00,0.63,notes on C -Project,2024-02-29 19:00:00,2024-02-29 20:15:00,1.25,autosave script for eolas -Project,2024-03-01 08:48:12,2024-03-01 09:15:26,0.45,autosave script for eolas -Project,2024-03-01 09:15:38,2024-03-01 11:45:00,2.49,linux ricing -Blogging,2024-03-01 13:25:31,2024-03-01 15:29:01,2.06,note taking routine -Project,2024-03-01 16:19:59,2024-03-01 17:03:59,0.73,set up time warrior -Project,2024-03-02 12:04:11,2024-03-02 13:21:32,1.29,set up time warrior -Project,2024-03-02 13:21:56,2024-03-02 14:28:16,1.11,time warrior waybar integration -Project,2024-03-02 15:30:15,2024-03-02 17:07:28,1.62,time warrior waybar integration diff --git a/scripts/upload_time_entries.py b/scripts/upload_time_entries.py deleted file mode 100755 index 62df465..0000000 --- a/scripts/upload_time_entries.py +++ /dev/null @@ -1,105 +0,0 @@ -#! /usr/local/bin/python3 - -# Export time entries from TimeWarrior CLI and upload to AWS DB via Lambda - -import subprocess -import json -import warnings -from datetime import datetime - - -def execute_shell_command(command): - try: - process = subprocess.run( - [command], - shell=True, - stdout=subprocess.PIPE, - stderr=subprocess.PIPE, - text=True, - ) - return process.stdout.strip() - except subprocess.CalledProcessError as e: - return e.stderr.strip() - - -def seconds_to_digital_time(seconds): - hours = seconds / 3600 - return round(hours, 2) - - -def get_tw_entries(): - time_entries = execute_shell_command("timew export") - return json.loads(time_entries) - - -def utc_to_sql_stamp(utc): - datetime_obj = datetime.strptime(utc, "%Y%m%dT%H%M%SZ") - sql_stamp = datetime_obj.strftime("%Y-%m-%d %H:%M:%S") - return sql_stamp - - -def get_entry_duration(utc1, utc2): - utc1_object = datetime.strptime(utc1, "%Y%m%dT%H%M%SZ") - utc2_object = datetime.strptime(utc2, "%Y%m%dT%H%M%SZ") - - time_difference = utc2_object - utc1_object - difference_seconds = time_difference.total_seconds() - return seconds_to_digital_time(difference_seconds) - - -def active_timer(): - status = execute_shell_command("timew get dom.active") - return True if status == "1" else False - - -def get_tags(tag_list): - if len(tag_list) > 0: - return tag_list - else: - warnings.warn("No tag data") - return ["null", "null"] - - -def process_entries(): - processed = [] - entries = get_tw_entries() - - for entry in entries: - tags = get_tags(entry["tags"]) - start_sql_stamp = utc_to_sql_stamp(entry["start"]) - end_sql_stamp = utc_to_sql_stamp(entry["end"]) - duration = get_entry_duration(entry["start"], entry["end"]) - - processed.append( - { - "activity_type": tags[0], - "start": start_sql_stamp, - "end": end_sql_stamp, - "duration": duration, - "description": tags[1], - } - ) - - return processed - - -def main(): - try: - active = False - - if active_timer(): - active = True - execute_shell_command("timew stop") - - time_entries = process_entries() - print(time_entries) - - if active: - execute_shell_command("timew continue") - - except Exception as e: - print(f"An error occurred: {e}") - - -if __name__ == "__main__": - main() diff --git a/tmux/tmux.conf b/tmux/tmux.conf index c197e15..0706a21 100644 --- a/tmux/tmux.conf +++ b/tmux/tmux.conf @@ -1,19 +1,19 @@ -# set -g default-terminal "screen-256color" -#set -ga terminal-overrides ",*256col*:Tc" +set -g default-terminal "screen-256color" +set -ga terminal-overrides ",*256col*:Tc" # set -g terminal-overrides ",alacritty:Tc" set-option -g status-position top set -g status-justify centre -set -g window-status-current-style 'bg=#282828,fg=#ebdbb2' +# set -g window-status-current-style 'bg=#282828,fg=#ebdbb2' set-option -g status-left " Session #S " -set -g status-right 'tmux ' +# set -g status-right 'tmux ' set -g window-status-format " #I:#W " set -g window-status-current-format " #I:#W " -set -g status-style "bg=#a89984,fg=#282828" +# set -g status-style "bg=#473c29,fg=#ebdbb2" # set -g status-bg colour8 # set -g status-fg colour7 @@ -27,6 +27,7 @@ bind j select-pane -D bind k select-pane -U bind l select-pane -R + bind-key -r C-Up resize-pane -U 5 bind-key -r C-Down resize-pane -D 5 bind-key -r C-Left resize-pane -L 5 diff --git a/waybar/resources/custom_modules/time_warrior_waybar.py b/waybar/resources/custom_modules/time_warrior_waybar.py index ce554f7..f935e42 100755 --- a/waybar/resources/custom_modules/time_warrior_waybar.py +++ b/waybar/resources/custom_modules/time_warrior_waybar.py @@ -38,17 +38,19 @@ def main(): if timer_active(): output["text"] = "Timer running" output["class"] = "active" + print("ACTIVE") else: output["text"] = "" output["class"] = "inactive" + print("IDLE") except Exception as e: output["text"] = "Error" - print(json.dumps(output)) + #print(output["text"]) + #print(json.dumps(output)) if __name__ == "__main__": main() -print(timer_active()) diff --git a/zsh/thomas.zsh-theme b/zsh/thomas.zsh-theme index 1da4f72..3505734 100644 --- a/zsh/thomas.zsh-theme +++ b/zsh/thomas.zsh-theme @@ -1,6 +1,6 @@ # -*- sh -*- vim:set ft=sh ai et sw=4 sts=4: # It might be bash like, but I can't have my co-workers knowing I use zsh -PROMPT='%{$fg_bold[green]%}%n@%m %{$fg_bold[magenta]%}%2~$(git_prompt_info)%{$reset_color%}%(.) ' +PROMPT='%{$fg_bold[green]%}%n@%m %{$fg_bold[magenta]%}(%2~)$(git_prompt_info)%{$reset_color%}%(.) ' ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[blue]%} " ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" diff --git a/zsh/zshrc b/zsh/zshrc index ce64d7d..62c12f1 100644 --- a/zsh/zshrc +++ b/zsh/zshrc @@ -1,5 +1,6 @@ -export ZSH="/home/thomas/.oh-my-zsh" + +export ZSH="/home/thomas/.oh-my-zsh" alias vim="nvim" alias cat="bat" alias grep="rg" @@ -7,10 +8,9 @@ alias tw="timew" alias z="cd /home/thomas/repos/eolas" alias zn="/home/thomas/repos/eolas/scripts/new_zk_note.sh" alias dot="cd /home/thomas/dotfiles" -alias gpt="chatgpt-cli" -alias ss="/home/thomas/dotfiles/scripts/screenshot.sh" -alias SS="/home/thomas/dotfiles/scripts/delayed_screenshot.sh" - +alias ddb="aws dynamodb" +alias zcom="/home/thomas/repos/eolas/scripts/auto_save.sh" +alias sysobs="cd /home/thomas/repos/systems-obscure" # alias xhd="cd /run/media/thomas" # alias cs-update="/home/thomas/repos/eolas/_scripts/auto_save.sh" # alias cs-query="/home/thomas/repos/eolas/_scripts/query.sh" @@ -27,8 +27,8 @@ plugins=(git npm fzf-tab zsh-autosuggestions zsh-syntax-highlighting) # User configuration -export EDITOR='nvim' source ~/.env +export EDITOR='nvim' source $ZSH/oh-my-zsh.sh export NVM_DIR="$HOME/.nvm"