diff options
Diffstat (limited to 'lua/ben')
-rw-r--r-- | lua/ben/core/init.lua | 31 | ||||
-rw-r--r-- | lua/ben/lazy.lua | 7 | ||||
-rw-r--r-- | lua/ben/plugins/alpha.lua | 8 | ||||
-rw-r--r-- | lua/ben/plugins/blamer.lua | 4 | ||||
-rw-r--r-- | lua/ben/plugins/colorscheme.lua | 29 | ||||
-rw-r--r-- | lua/ben/plugins/copilot.lua | 7 | ||||
-rw-r--r-- | lua/ben/plugins/lsp/mason.lua | 101 | ||||
-rw-r--r-- | lua/ben/plugins/orgmode.lua | 20 | ||||
-rw-r--r-- | lua/ben/plugins/telescope.lua | 14 |
9 files changed, 120 insertions, 101 deletions
diff --git a/lua/ben/core/init.lua b/lua/ben/core/init.lua index 5d8b7b0..eaaba6a 100644 --- a/lua/ben/core/init.lua +++ b/lua/ben/core/init.lua @@ -72,34 +72,3 @@ vim.cmd([[autocmd BufWritePre * %s/\s\+$//e]]) -- Tree View for the netrw File Manager vim.g.netrw_liststyle = 3 vim.g.netrw_banner = 0 --- If nvim is opened with no arguments, open the netrw file manager -local mygroup = vim.api.nvim_create_augroup("loading_netrwPlugin", { clear = true }) -vim.api.nvim_create_autocmd({ "VimEnter" }, { - pattern = { "*" }, - callback = function() - -- Getting the file name that you pass when you launch nvim, - local current_file = vim.fn.expand("%") - -- if we have already file_name, then, we edit it - if current_file ~= "" then - vim.cmd(":silent! edit " .. current_file) - else - -- We will check if the window (buffer) is the lazy nvim, as it conflict if the buffer (popup menu) is lazy - local lazy_popup_buf_exists = false - -- We will get list of all current opened buffers - local buf_list = vim.api.nvim_list_bufs() - for _, buf in ipairs(buf_list) do - -- We will obtain from the table only the filetype - local buf_ft = vim.api.nvim_buf_get_option(buf, "filetype") - if buf_ft == "lazy" then - lazy_popup_buf_exists = true - end - end -- Check if vim-floaterm is loaded - local has_floaterm, _ = pcall(require, "floaterm") - if not lazy_popup_buf_exists and not has_floaterm then - -- Then we can safely loading netrwPlugin at startup - vim.cmd(":silent! Explore") - end - end - end, - group = mygroup, -}) diff --git a/lua/ben/lazy.lua b/lua/ben/lazy.lua index a725823..e363abb 100644 --- a/lua/ben/lazy.lua +++ b/lua/ben/lazy.lua @@ -1,4 +1,3 @@ - local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" if not vim.loop.fs_stat(lazypath) then vim.fn.system({ @@ -12,11 +11,11 @@ if not vim.loop.fs_stat(lazypath) then end vim.opt.rtp:prepend(lazypath) require("lazy").setup({ - {import = "ben.plugins" }, - {import = "ben.plugins.lsp" }, + { import = "ben.plugins" }, + { import = "ben.plugins.lsp" }, }, { install = { - colorscheme = { "friffle" }, + colorscheme = { "everforest" }, }, checker = { enabled = true, diff --git a/lua/ben/plugins/alpha.lua b/lua/ben/plugins/alpha.lua new file mode 100644 index 0000000..62a1cb8 --- /dev/null +++ b/lua/ben/plugins/alpha.lua @@ -0,0 +1,8 @@ +return { + priority = 1000, + "goolord/alpha-nvim", + dependencies = "nvim-tree/nvim-web-devicons", + config = function() + require("alpha").setup(require("alpha.themes.theta").config) + end, +} diff --git a/lua/ben/plugins/blamer.lua b/lua/ben/plugins/blamer.lua index daf37cf..1a8217a 100644 --- a/lua/ben/plugins/blamer.lua +++ b/lua/ben/plugins/blamer.lua @@ -1,4 +1,5 @@ return { + enabled = false, "APZelos/blamer.nvim", config = function() vim.g.blamer_enabled = 1 @@ -6,4 +7,7 @@ return { vim.g.blamer_template = "<committer>, <committer-time> • <summary>" vim.g.blamer_prefix = ">" end, + cond = function() + return vim.fn.has("linux") == 1 + end, } diff --git a/lua/ben/plugins/colorscheme.lua b/lua/ben/plugins/colorscheme.lua index fce5735..9d58a17 100644 --- a/lua/ben/plugins/colorscheme.lua +++ b/lua/ben/plugins/colorscheme.lua @@ -1,8 +1,21 @@ return { + -- Treesitter optimized colorscheme + { + "neanias/everforest-nvim", + priority = 1000, + version = false, + config = function() + require("everforest").setup({}) + vim.cmd([[set tgc]]) -- Terminal GUI Colors + vim.cmd([[set lz]]) -- Lazy redraw + vim.cmd([[set t_Co=256]]) -- 256 Colors + vim.cmd([[colorscheme everforest]]) + end, + }, -- My very own colorscheme { "ChausseBenjamin/friffle-vim", - priority = 1000, + lazy = true, config = function() vim.cmd([[syntax on]]) -- Enable vim syntax vim.cmd([[set tgc]]) -- Terminal GUI Colors @@ -24,18 +37,4 @@ return { "djpohly/elly.vim", lazy = true, }, - -- Treesitter optimized colorscheme - { - "neanias/everforest-nvim", - version = false, - lazy = true, - config = function() - require("everforest").setup({}) - end, - }, - -- Syntax for SXHKD - { - "kovetskiy/sxhkd-vim", - ft = "sxhkdrc", - }, } diff --git a/lua/ben/plugins/copilot.lua b/lua/ben/plugins/copilot.lua index 2347f29..c62a8f5 100644 --- a/lua/ben/plugins/copilot.lua +++ b/lua/ben/plugins/copilot.lua @@ -1,3 +1,10 @@ return { "github/copilot.vim", + event = "VeryLazy", + config = function() + vim.cmd([[Copilot enable]]) + end, + build = function() + vim.cmd([[Copilot setup]]) + end, } diff --git a/lua/ben/plugins/lsp/mason.lua b/lua/ben/plugins/lsp/mason.lua index c1a3c10..6ea32cc 100644 --- a/lua/ben/plugins/lsp/mason.lua +++ b/lua/ben/plugins/lsp/mason.lua @@ -1,57 +1,58 @@ return { - "williamboman/mason.nvim", - dependencies = { - "williamboman/mason-lspconfig.nvim", - "jayp0521/mason-null-ls.nvim", - }, - config = function() - -- import mason - local mason = require("mason") + "williamboman/mason.nvim", + event = "VeryLazy", + dependencies = { + "williamboman/mason-lspconfig.nvim", + "jayp0521/mason-null-ls.nvim", + }, + config = function() + -- import mason + local mason = require("mason") - -- import mason-lspconfig - local mason_lspconfig = require("mason-lspconfig") + -- import mason-lspconfig + local mason_lspconfig = require("mason-lspconfig") - -- import mason-null-ls - local mason_null_ls = require("mason-null-ls") + -- import mason-null-ls + local mason_null_ls = require("mason-null-ls") - -- enable mason and configure icons - mason.setup({ - ui = { - icons = { - package_installed = "✓", - package_pending = "➜", - package_uninstalled = "✗" - } - } - }) + -- enable mason and configure icons + mason.setup({ + ui = { + icons = { + package_installed = "✓", + package_pending = "➜", + package_uninstalled = "✗", + }, + }, + }) - mason_lspconfig.setup({ - -- list of servers for mason to install - ensure_installed = { - "tsserver", - "html", - "cssls", - "tailwindcss", - "svelte", - "lua_ls", - "graphql", - "emmet_ls", - "prismals", - "pyright" - }, - -- auto-install configured servers (with lspconfig) - automatic_installation = true, -- not the same as ensure_installed - }) + mason_lspconfig.setup({ + -- list of servers for mason to install + ensure_installed = { + "tsserver", + "html", + "cssls", + "tailwindcss", + "svelte", + "lua_ls", + "graphql", + "emmet_ls", + "prismals", + "pyright", + }, + -- auto-install configured servers (with lspconfig) + automatic_installation = true, -- not the same as ensure_installed + }) - mason_null_ls.setup({ - -- list of formatters & linters for mason to install - ensure_installed = { - "prettier", -- ts/js formatter - "stylua", -- lua formatter - "eslint_d", -- ts/js linter - }, - -- auto-install configured servers (with lspconfig) - automatic_installation = true, - }) - end, + mason_null_ls.setup({ + -- list of formatters & linters for mason to install + ensure_installed = { + "prettier", -- ts/js formatter + "stylua", -- lua formatter + "eslint_d", -- ts/js linter + }, + -- auto-install configured servers (with lspconfig) + automatic_installation = true, + }) + end, } diff --git a/lua/ben/plugins/orgmode.lua b/lua/ben/plugins/orgmode.lua index 1007b0a..8a0c023 100644 --- a/lua/ben/plugins/orgmode.lua +++ b/lua/ben/plugins/orgmode.lua @@ -2,6 +2,26 @@ return { "nvim-orgmode/orgmode", dependencies = { { "nvim-treesitter/nvim-treesitter", lazy = true }, + { "dhruvasagar/vim-table-mode", lazy = true }, + { + "akinsho/org-bullets.nvim", + enable = false, + lazy = true, + config = function() + require("org-bullets").setup({ + symbols = { + concealcursor = false, + list = "", + headlines = { "◉", "○", "", "" }, + checkboxes = { + half = { "", "OrgTSCheckboxHalfChecked" }, + done = { "", "OrgTSCheckboxDone" }, + todo = { "", "OrgTSCheckboxTODO" }, + }, + }, + }) + end, + }, }, event = "VeryLazy", config = function() diff --git a/lua/ben/plugins/telescope.lua b/lua/ben/plugins/telescope.lua index f5857cd..d6b4b88 100644 --- a/lua/ben/plugins/telescope.lua +++ b/lua/ben/plugins/telescope.lua @@ -1,7 +1,16 @@ return { "nvim-telescope/telescope.nvim", branch = "0.1.x", - dependencies = { "nvim-lua/plenary.nvim" }, + dependencies = { + "nvim-lua/plenary.nvim", + { + "joaomsa/telescope-orgmode.nvim", + event = "VeryLazy", + config = function() + require("telescope").load_extension("orgmode") + end, + }, + }, keys = { -- LazyLoad telescope when it's actually needed -- F.ind F.iles @@ -21,5 +30,8 @@ return { -- F.ind C.olor S.cheme { "<leader>fcs", '<cmd>lua require("telescope.builtin").colorscheme()<cr>' }, + + -- F.ing O.rgmode + { "<leader>fo", '<cmd>lua require("telescope").extensions.orgmode.seach_headings()<cr>' }, }, } |