diff options
author | Benjamin Chausse <benjamin@chausse.xyz> | 2024-06-17 21:24:17 -0400 |
---|---|---|
committer | Benjamin Chausse <benjamin@chausse.xyz> | 2024-06-17 21:24:17 -0400 |
commit | de2aaa7fd5a90a81de8d216232bb39830ff6041d (patch) | |
tree | 8c6887de318cc13345d5377b3b27deb738bed5e6 /lua | |
parent | 7662376a0498aa3feb830a2ec7b3126706f49f2f (diff) | |
parent | 3990159461b650064cbb2e385b17a286b657790d (diff) |
Merge branch 'master' of github.com:ChausseBenjamin/neovim-conf
Diffstat (limited to 'lua')
-rw-r--r-- | lua/core/init.lua | 2 | ||||
-rw-r--r-- | lua/plugins/colorscheme.lua | 19 | ||||
-rw-r--r-- | lua/plugins/dadbod.lua | 7 | ||||
-rw-r--r-- | lua/plugins/fugitive.lua | 15 | ||||
-rw-r--r-- | lua/plugins/harpoon.lua | 37 | ||||
-rw-r--r-- | lua/plugins/orgmode.lua | 2 |
6 files changed, 49 insertions, 33 deletions
diff --git a/lua/core/init.lua b/lua/core/init.lua index c0ab11d..3e33124 100644 --- a/lua/core/init.lua +++ b/lua/core/init.lua @@ -52,4 +52,4 @@ vim.keymap.set("n", "S", "<nop>") vim.keymap.set("n", "<leader>w", "<C-w>") -- Quickly navigate between Tabs vim.keymap.set("n", "<Tab>", "<cmd>tabnext<cr>") -vim.keymap.set("n", "<S-Tab>", "<cmd>tabprevious<cr>") +vim.keymap.set("n", "<S-Tab>", "<cmd>tabnew<cr>") diff --git a/lua/plugins/colorscheme.lua b/lua/plugins/colorscheme.lua index e919515..48f327b 100644 --- a/lua/plugins/colorscheme.lua +++ b/lua/plugins/colorscheme.lua @@ -1,4 +1,5 @@ -return { -- No nonsense, very stoic +return { + { -- No nonsense, very stoic "aktersnurra/no-clown-fiesta.nvim", dependencies = { { "nvim-treesitter/nvim-treesitter", @@ -58,6 +59,7 @@ return { -- No nonsense, very stoic vim.api.nvim_set_hl(0,"LineNr",{fg="#727272"}) -- vim.api.nvim_set_hl(0,"Visual",{bg="#171717"}) -- vim.api.nvim_set_hl(0,"Visual",{bg="#829e9c"}) + vim.api.nvim_set_hl(0,"@markup.strong",{bold=true}) vim.api.nvim_set_hl(0,"Visual",{bg="#84493b"}) vim.api.nvim_set_hl(0,"Folded",{bg="none"}) vim.api.nvim_set_hl(0,"VertSplit",{bg="none",fg="#727272"}) @@ -68,4 +70,19 @@ return { -- No nonsense, very stoic vim.api.nvim_set_hl(0,"NormalFloat",{bg=fullbg}) vim.api.nvim_set_hl(0,"FloatBorder",{bg="none",fg=fullbg}) end, + }, { + "neanias/everforest-nvim", + version = false, + priority = 1000, + config = function() + require("everforest").setup({ + background = "hard", + transparent_background_level=2 + }) + end, + }, { + "ChausseBenjamin/friffle-vim", + version = false, + priority = 1000, + } } diff --git a/lua/plugins/dadbod.lua b/lua/plugins/dadbod.lua new file mode 100644 index 0000000..84526f4 --- /dev/null +++ b/lua/plugins/dadbod.lua @@ -0,0 +1,7 @@ +return { + "tpope/vim-dadbod", + dependencies = { + "kristijanhusak/vim-dadbod-ui", + "kristijanhusak/vim-dadbod-completion", + }, +} diff --git a/lua/plugins/fugitive.lua b/lua/plugins/fugitive.lua index bbb5ef8..6bb5190 100644 --- a/lua/plugins/fugitive.lua +++ b/lua/plugins/fugitive.lua @@ -4,18 +4,6 @@ return { dependencies = "tpope/vim-rhubarb", config = function() - -- The following seems to break harpoon - -- it's supposed to auto-cd to the git root on vim startup - - -- local handle = io.popen('git rev-parse --is-inside-work-tree 2> /dev/null') - -- if handle then - -- local result = handle:read('*a') - -- handle:close() - -- if result and result:match('true') then - -- vim.cmd([[Gcd]]) - -- end - -- end - end, -- Only load when using one of the following commands: keys = { @@ -26,5 +14,8 @@ return { { "<leader>gu", "<cmd>G push<CR>" }, -- G.it push U.pstream { "<leader>gp", "<cmd>G pull<CR>" }, -- G.it P.ull { "<leader>gf", "<cmd>G fetch<CR>" }, -- G.it F.etch + { "<leader>ds", "<cmd>Gvdiffsplit!<CR>" }, + { "<leader>dh", "<cmd>diffget //2<CR>" }, + { "<leader>dl", "<cmd>diffget //3<CR>" }, }, } diff --git a/lua/plugins/harpoon.lua b/lua/plugins/harpoon.lua index 9d061cf..6f15fc4 100644 --- a/lua/plugins/harpoon.lua +++ b/lua/plugins/harpoon.lua @@ -6,28 +6,29 @@ return { "nvim-telescope/telescope.nvim" }, config = function() + + -- Cd to git root on startup to retain harpoons wherever vim starts + local function is_git_repo() + local git_dir = vim.fn.systemlist("git rev-parse --show-toplevel") + if vim.v.shell_error ~= 0 then + return false + end + return git_dir[1] + end + + local function cd_to_git_root() + local git_root = is_git_repo() + if git_root then + vim.cmd('tcd ' .. git_root) + end + end + + cd_to_git_root() + local harpoon = require("harpoon") harpoon:setup() - -- -- basic telescope config - -- local conf = require("telescope.config").values - -- local function toggle_telescope(harpoon_files) - -- local file_paths = {} - -- for _, item in ipairs(harpoon_files.items) do - -- table.insert(file_paths, item.value) - -- end - - -- require("telescope.pickers").new({}, { - -- prompt_title = "Harpoon", - -- finder = require("telescope.finders").new_table({ - -- results = file_paths, - -- }), - -- previewer = conf.file_previewer({}), - -- sorter = conf.generic_sorter({}), - -- }):find() - -- end - -- harpoon keybindings vim.keymap.set("n", "<leader>a", function() harpoon:list():add() end ) -- vim.keymap.set("n", "<C-e>", function() toggle_telescope(harpoon:list()) end, {desc = "Open harpoon window"} ) diff --git a/lua/plugins/orgmode.lua b/lua/plugins/orgmode.lua index 45bee81..fa1281a 100644 --- a/lua/plugins/orgmode.lua +++ b/lua/plugins/orgmode.lua @@ -20,7 +20,7 @@ return { -- Setup orgmode require('orgmode').setup({ -- win_split_mode = {'float', 0.9}, - win_split_mode = 'float', + -- win_split_mode = 'float', org_agenda_files = '~/Dropbox/org/**/*', org_default_notes_file = '~/Dropbox/org/index.org', calendar_week_start_day = 0, |