diff --git a/.config/nvim/after/plugin/orgmode.lua b/.config/nvim/after/plugin/orgmode.lua index 9a9ae33..a6af479 100644 --- a/.config/nvim/after/plugin/orgmode.lua +++ b/.config/nvim/after/plugin/orgmode.lua @@ -16,6 +16,6 @@ require('nvim-treesitter.configs').setup { } require('orgmode').setup({ - org_agenda_files = { '~/Nextcloud/Documents/uni/**/*'}, - org_default_notes_file = '~/Nextcloud/Documents/uni/refile.org', + org_agenda_files = { '~/Nextcloud/org/**/*'}, + org_default_notes_file = '~/Nextcloud/org/refile.org', }) diff --git a/.config/nvim/lua/tsousa/packer.lua b/.config/nvim/lua/tsousa/packer.lua index 0dcc61e..a7a1951 100644 --- a/.config/nvim/lua/tsousa/packer.lua +++ b/.config/nvim/lua/tsousa/packer.lua @@ -39,7 +39,6 @@ return require('packer').startup(function(use) use("williamboman/mason-lspconfig.nvim") use("hrsh7th/cmp-nvim-lsp") use("neovim/nvim-lspconfig") - use("mfussenegger/nvim-jdtls") use("jose-elias-alvarez/null-ls.nvim") use({ "L3MON4D3/LuaSnip", diff --git a/.config/nvim/tsousa/packer.lua b/.config/nvim/tsousa/packer.lua index 0dcc61e..da1576f 100644 --- a/.config/nvim/tsousa/packer.lua +++ b/.config/nvim/tsousa/packer.lua @@ -1,13 +1,9 @@ return require('packer').startup(function(use) -- Packer can manage itself - use("wbthomason/packer.nvim") - use("nvim-lua/plenary.nvim") use("nvim-lua/popup.nvim") use("nvim-telescope/telescope.nvim") use("tpope/vim-surround") - use("tpope/vim-fugitive") - use("theprimeagen/harpoon") use("mbbill/undotree") -- fidget change when rewrite version comes out @@ -25,15 +21,6 @@ return require('packer').startup(function(use) use("lervag/vimtex") - use({ - "hrsh7th/nvim-cmp", - requires = { - "hrsh7th/cmp-nvim-lsp", -- lsp - "hrsh7th/cmp-buffer", --buffer completions - "hrsh7th/cmp-path", --path completions - "hrsh7th/cmp-cmdline" --cmdline completions - }, - }) use("williamboman/mason.nvim") use("williamboman/mason-lspconfig.nvim") @@ -52,10 +39,6 @@ return require('packer').startup(function(use) run = ":TSUpdate" }) - - use("nvim-orgmode/orgmode") - use('nvim-lualine/lualine.nvim') - use("nvim-treesitter/playground") use("romgrk/nvim-treesitter-context") diff --git a/.config/nvim/tsousa/plugins/cmp.lua b/.config/nvim/tsousa/plugins/cmp.lua index c0348bc..d2759e3 100644 --- a/.config/nvim/tsousa/plugins/cmp.lua +++ b/.config/nvim/tsousa/plugins/cmp.lua @@ -1,6 +1,7 @@ return { "hrsh7th/nvim-cmp", - dependencies = { + event = "InsertEnter", + dependencies = { 'hrsh7th/cmp-nvim-lsp', -- lsp 'hrsh7th/cmp-nvim-lua', -- Nvim API completions 'hrsh7th/cmp-nvim-lsp-signature-help', -- Show function signatures @@ -11,7 +12,7 @@ return { 'rafamadriz/friendly-snippets', 'saadparwaiz1/cmp_luasnip', }, - opts = function(_, opts) + config = function() local cmp_status_ok, cmp = pcall(require, "cmp") if not cmp_status_ok then return diff --git a/.config/nvim/tsousa/plugins/fugitive.lua b/.config/nvim/tsousa/plugins/fugitive.lua index 80c9070..a5b5b04 100644 --- a/.config/nvim/tsousa/plugins/fugitive.lua +++ b/.config/nvim/tsousa/plugins/fugitive.lua @@ -1 +1,6 @@ -vim.keymap.set("n", "gs", vim.cmd.Git) +return { + "tpope/vim-fugitive", + config = function() + vim.keymap.set("n", "gs", vim.cmd.Git) + end +} diff --git a/.config/nvim/tsousa/plugins/harpoon.lua b/.config/nvim/tsousa/plugins/harpoon.lua index a082d80..8777f00 100644 --- a/.config/nvim/tsousa/plugins/harpoon.lua +++ b/.config/nvim/tsousa/plugins/harpoon.lua @@ -1,10 +1,15 @@ -local mark = require("harpoon.mark") -local ui = require("harpoon.ui") +return { + "theprimeagen/harpoon", + config = function() + local mark = require("harpoon.mark") + local ui = require("harpoon.ui") -vim.keymap.set("n", "a", mark.add_file) -vim.keymap.set("n", "", ui.toggle_quick_menu) + vim.keymap.set("n", "a", mark.add_file) + vim.keymap.set("n", "", ui.toggle_quick_menu) -vim.keymap.set("n", "", function () ui.nav_file(1) end) -vim.keymap.set("n", "", function () ui.nav_file(2) end) -vim.keymap.set("n", "", function () ui.nav_file(3) end) -vim.keymap.set("n", "", function () ui.nav_file(4) end) + vim.keymap.set("n", "", function() ui.nav_file(1) end) + vim.keymap.set("n", "", function() ui.nav_file(2) end) + vim.keymap.set("n", "", function() ui.nav_file(3) end) + vim.keymap.set("n", "", function() ui.nav_file(4) end) + end +} diff --git a/.config/nvim/tsousa/plugins/orgmode.lua b/.config/nvim/tsousa/plugins/orgmode.lua index 9a9ae33..67563c3 100644 --- a/.config/nvim/tsousa/plugins/orgmode.lua +++ b/.config/nvim/tsousa/plugins/orgmode.lua @@ -1,21 +1,26 @@ --- -- Load custom treesitter grammar for org filetype -require('orgmode').setup_ts_grammar() +return { + "nvim-orgmode/orgmode", + config = function() + -- -- Load custom treesitter grammar for org filetype + require('orgmode').setup_ts_grammar() --- Treesitter configuration + -- Treesitter configuration -require('nvim-treesitter.configs').setup { - -- If TS highlights are not enabled at all, or disabled via `disable` prop, - -- highlighting will fallback to default Vim syntax highlighting - highlight = { - enable = true, - -- Required for spellcheck, some LaTex highlights and - -- code block highlights that do not have ts grammar - additional_vim_regex_highlighting = { 'org' }, - }, - ensure_installed = { 'org' }, -- Or run :TSUpdate org + require('nvim-treesitter.configs').setup { + -- If TS highlights are not enabled at all, or disabled via `disable` prop, + -- highlighting will fallback to default Vim syntax highlighting + highlight = { + enable = true, + -- Required for spellcheck, some LaTex highlights and + -- code block highlights that do not have ts grammar + additional_vim_regex_highlighting = { 'org' }, + }, + ensure_installed = { 'org' }, -- Or run :TSUpdate org + } + + require('orgmode').setup({ + org_agenda_files = { '~/Nextcloud/Documents/uni/**/*' }, + org_default_notes_file = '~/Nextcloud/Documents/uni/refile.org', + }) + end } - -require('orgmode').setup({ - org_agenda_files = { '~/Nextcloud/Documents/uni/**/*'}, - org_default_notes_file = '~/Nextcloud/Documents/uni/refile.org', -}) diff --git a/.config/nvim/tsousa/plugins/statusline.lua b/.config/nvim/tsousa/plugins/statusline.lua index 56c426a..b7448f9 100644 --- a/.config/nvim/tsousa/plugins/statusline.lua +++ b/.config/nvim/tsousa/plugins/statusline.lua @@ -1,40 +1,45 @@ -require('lualine').setup { - options = { - icons_enabled = true, - theme = 'auto', - component_separators = { left = '', right = ''}, - section_separators = { left = '', right = ''}, - disabled_filetypes = { - statusline = {}, - winbar = {}, - }, - ignore_focus = {}, - always_divide_middle = true, - globalstatus = false, - refresh = { - statusline = 1000, - tabline = 1000, - winbar = 1000, - } - }, - sections = { - lualine_a = {'mode'}, - lualine_b = {'branch', 'diff', 'diagnostics'}, - lualine_c = {'filename'}, - lualine_x = {'encoding', 'fileformat', 'filetype'}, - lualine_y = {'progress'}, - lualine_z = {'location'} - }, - inactive_sections = { - lualine_a = {}, - lualine_b = {}, - lualine_c = {'filename'}, - lualine_x = {'location'}, - lualine_y = {}, - lualine_z = {} - }, - tabline = {}, - winbar = {}, - inactive_winbar = {}, - extensions = {} +return { + "nvim-lualine/lualine.nvim", + config = function() + require('lualine').setup { + options = { + icons_enabled = true, + theme = 'auto', + component_separators = { left = '', right = '' }, + section_separators = { left = '', right = '' }, + disabled_filetypes = { + statusline = {}, + winbar = {}, + }, + ignore_focus = {}, + always_divide_middle = true, + globalstatus = false, + refresh = { + statusline = 1000, + tabline = 1000, + winbar = 1000, + } + }, + sections = { + lualine_a = { 'mode' }, + lualine_b = { 'branch', 'diff', 'diagnostics' }, + lualine_c = { 'filename' }, + lualine_x = { 'encoding', 'fileformat', 'filetype' }, + lualine_y = { 'progress' }, + lualine_z = { 'location' } + }, + inactive_sections = { + lualine_a = {}, + lualine_b = {}, + lualine_c = { 'filename' }, + lualine_x = { 'location' }, + lualine_y = {}, + lualine_z = {} + }, + tabline = {}, + winbar = {}, + inactive_winbar = {}, + extensions = {} + } + end } diff --git a/.config/nvim/tsousa/plugins/treesitter.lua b/.config/nvim/tsousa/plugins/treesitter.lua index 7ddfa82..f6ee588 100644 --- a/.config/nvim/tsousa/plugins/treesitter.lua +++ b/.config/nvim/tsousa/plugins/treesitter.lua @@ -1,9 +1,15 @@ -require'nvim-treesitter.configs'.setup { - ensure_installed = {"lua","vim","python","rust","haskell","c","java", "bash","go"}, - sync_install = false, +return { + "nvim-treesitter/nvim-treesitter", + run = "TSUpdate", + config = function() + endrequire 'nvim-treesitter.configs'.setup { + ensure_installed = { "lua", "vim", "python", "rust", "haskell", "c", "java", "bash", "go" }, + sync_install = false, - highlight = { - enable = true, - additional_vim_regex_highlighting = false, - }, + highlight = { + enable = true, + additional_vim_regex_highlighting = false, + }, + } + end }