From 667e3645da36eca6ba678e6021083ba3e4b232b7 Mon Sep 17 00:00:00 2001 From: sudacode Date: Tue, 15 Aug 2023 08:48:03 -0700 Subject: [PATCH] add neoorg --- init.vim | 2 +- lua/plugins.lua | 19 +++++++ plugin-confs/nvim-cmp.lua | 1 + plugin-confs/nvimtree.lua | 111 +++++++++++++------------------------- 4 files changed, 57 insertions(+), 76 deletions(-) diff --git a/init.vim b/init.vim index ab8d7b5..9142913 100644 --- a/init.vim +++ b/init.vim @@ -34,7 +34,7 @@ source ~/.config/nvim/plugin-confs/lsplines.lua source ~/.config/nvim/plugin-confs/null-ls.lua source ~/.config/nvim/plugin-confs/nvim-cmp.lua source ~/.config/nvim/plugin-confs/fidget.lua -source ~/.config/nvim/plugin-confs/symbols-outline.lua +" source ~/.config/nvim/plugin-confs/symbols-outline.lua source ~/.config/nvim/plugin-confs/chatgpt.lua source ~/.config/nvim/plugin-confs/nvim-colorizer.lua " source ~/.config/nvim/plugin-confs/copilot.lua diff --git a/lua/plugins.lua b/lua/plugins.lua index 9330f1b..cbee616 100644 --- a/lua/plugins.lua +++ b/lua/plugins.lua @@ -91,6 +91,25 @@ require('packer').startup(function(use) end } + use { + "nvim-neorg/neorg", + -- tag = "*", + ft = "norg", + after = "nvim-treesitter", -- You may want to specify Telescope here as well + config = function() + require('neorg').setup { + load = { + ["core.defaults"] = {}, -- Loads default behaviour + ["core.concealer"] = {}, -- Adds pretty icons to your documents + ["core.completion"] = { config = { engine = "nvim-cmp" } }, -- Adds completion + ["core.dirman"] = { -- Manages Neorg workspaces + config = { workspaces = { notes = "~/notes" } } + } + } + } + end + } + use { 'junegunn/fzf', run = function() vim.fn['fzf#install']() end } -- use { diff --git a/plugin-confs/nvim-cmp.lua b/plugin-confs/nvim-cmp.lua index 653c8d2..d337a59 100644 --- a/plugin-confs/nvim-cmp.lua +++ b/plugin-confs/nvim-cmp.lua @@ -159,6 +159,7 @@ cmp.setup({ { name = 'nvim_lsp', group_index = 2 }, { name = 'nvim_lsp_signature_help', group_index = 2 }, { name = 'nvim_lsp_document_symbol', group_index = 2 }, + { name = 'neorg', group_index = 2 }, -- For luasnip users. { name = 'luasnip', group_index = 2 }, -- For luasnip users. { name = 'buffer', diff --git a/plugin-confs/nvimtree.lua b/plugin-confs/nvimtree.lua index 425b493..915f0ad 100644 --- a/plugin-confs/nvimtree.lua +++ b/plugin-confs/nvimtree.lua @@ -1,68 +1,42 @@ require 'nvim-tree'.setup { - disable_netrw = false, - hijack_netrw = false, + disable_netrw = false, + hijack_netrw = false, -- open_on_setup = false, -- ignore_ft_on_setup = {}, -- auto_close = false, - open_on_tab = false, - hijack_cursor = false, - update_cwd = false, + open_on_tab = false, + hijack_cursor = false, + update_cwd = false, -- update_to_buf_dir = { -- enable = true, -- auto_open = true, -- }, - diagnostics = { + diagnostics = { enable = true, - icons = { - hint = "", - info = "", - warning = "", - error = "", - } + icons = { hint = "", info = "", warning = "", error = "" } }, - update_focused_file = { - enable = false, - update_cwd = false, - ignore_list = {} - }, - system_open = { - cmd = nil, - args = {} - }, - filters = { - dotfiles = false, - custom = {} - }, - git = { - enable = true, - ignore = true, - timeout = 500, - }, - view = { + update_focused_file = { enable = false, update_cwd = false, ignore_list = {} }, + system_open = { cmd = nil, args = {} }, + filters = { dotfiles = false, custom = {} }, + git = { enable = true, ignore = true, timeout = 500 }, + view = { width = 35, -- height = 35, hide_root_folder = false, side = 'left', -- auto_resize = false, - mappings = { - custom_only = false, - list = {} - }, + -- mappings = { + -- custom_only = false, + -- list = {} + -- }, number = false, relativenumber = false, signcolumn = "yes" }, - trash = { - cmd = "trash", - require_confirm = true - }, - actions = { - change_dir = { - global = false, - }, - open_file = { - quit_on_open = false, - } + trash = { cmd = "trash", require_confirm = true }, + actions = { + change_dir = { global = false }, + open_file = { quit_on_open = false } } } @@ -71,36 +45,23 @@ require 'nvim-tree'.setup { -- default mappings local list = { { key = { "", "o", "<2-LeftMouse>" }, action = "edit" }, - { key = { "O" }, action = "edit_no_picker" }, - { key = { "<2-RightMouse>", "" }, action = "cd" }, - { key = "", action = "vsplit" }, - { key = "", action = "split" }, - { key = "", action = "tabnew" }, - { key = "<", action = "prev_sibling" }, - { key = ">", action = "next_sibling" }, - { key = "P", action = "parent_node" }, - { key = "", action = "close_node" }, - { key = "", action = "preview" }, - { key = "K", action = "first_sibling" }, - { key = "J", action = "last_sibling" }, + { key = { "O" }, action = "edit_no_picker" }, + { key = { "<2-RightMouse>", "" }, action = "cd" }, + { key = "", action = "vsplit" }, { key = "", action = "split" }, + { key = "", action = "tabnew" }, { key = "<", action = "prev_sibling" }, + { key = ">", action = "next_sibling" }, { key = "P", action = "parent_node" }, + { key = "", action = "close_node" }, { key = "", action = "preview" }, + { key = "K", action = "first_sibling" }, { key = "J", action = "last_sibling" }, { key = "I", action = "toggle_ignored" }, - { key = "H", action = "toggle_dotfiles" }, - { key = "R", action = "refresh" }, - { key = "a", action = "create" }, - { key = "d", action = "remove" }, - { key = "D", action = "trash" }, - { key = "r", action = "rename" }, - { key = "", action = "full_rename" }, - { key = "x", action = "cut" }, - { key = "c", action = "copy" }, - { key = "p", action = "paste" }, - { key = "y", action = "copy_name" }, - { key = "Y", action = "copy_path" }, + { key = "H", action = "toggle_dotfiles" }, { key = "R", action = "refresh" }, + { key = "a", action = "create" }, { key = "d", action = "remove" }, + { key = "D", action = "trash" }, { key = "r", action = "rename" }, + { key = "", action = "full_rename" }, { key = "x", action = "cut" }, + { key = "c", action = "copy" }, { key = "p", action = "paste" }, + { key = "y", action = "copy_name" }, { key = "Y", action = "copy_path" }, { key = "gy", action = "copy_absolute_path" }, { key = "[c", action = "prev_git_item" }, - { key = "]c", action = "next_git_item" }, - { key = "-", action = "dir_up" }, - { key = "s", action = "system_open" }, - { key = "q", action = "close" }, - { key = "g?", action = "toggle_help" }, + { key = "]c", action = "next_git_item" }, { key = "-", action = "dir_up" }, + { key = "s", action = "system_open" }, { key = "q", action = "close" }, + { key = "g?", action = "toggle_help" } }