diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua index f90c1fe..3dc9b92 100644 --- a/.config/nvim/init.lua +++ b/.config/nvim/init.lua @@ -121,7 +121,10 @@ end map('i', '', 'A') map('i', '', 'I') +-- Load recent sessions map('n', 'sl', 'SessionLoad') + +-- Keybindings for telescope map('n', 'fr', 'Telescope oldfiles') map('n', 'ff', 'Telescope find_files') map('n', 'fb', 'Telescope file_browser') @@ -142,7 +145,7 @@ db.default_banner = { ' ██║ ╚████║ ███████╗╚██████╔╝ ╚████╔╝ ██║ ██║ ╚═╝ ██║', ' ╚═╝ ╚═══╝ ╚══════╝ ╚═════╝ ╚═══╝ ╚═╝ ╚═╝ ╚═╝', '', - ' [ TIP: To exit neovim, just poweroff your computer. ] ', + ' [ TIP: To exit Neovim, just power off your computer. ] ', '', } -- linux @@ -179,48 +182,8 @@ db.custom_center = { } db.custom_footer = { '', '🎉 If I\'m using Neovim, then my Emacs config must be broken!' } --- TELESCOPE FILE BROWSER ----- You don't need to set any of these options. --- IMPORTANT!: this is only a showcase of how you can set default options! -require("telescope").setup { - extensions = { - file_browser = { - theme = "ivy", - -- disables netrw and use telescope-file-browser in its place - hijack_netrw = true, - mappings = { - ["i"] = { - -- your custom insert mode mappings - }, - ["n"] = { - -- your custom normal mode mappings - }, - }, - }, - }, -} -- To get telescope-file-browser loaded and working with telescope, -- you need to call load_extension, somewhere after setup function: -require("telescope").load_extension "file_browser" - --- ORGMODE --- Load custom tree-sitter grammar for org filetype -require('orgmode').setup_ts_grammar() - --- Tree-sitter 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, - additional_vim_regex_highlighting = {'org'}, -- Required for spellcheck, some LaTex highlights and code block highlights that do not have ts grammar - }, - ensure_installed = {'org'}, -- Or run :TSUpdate org -} - -require('orgmode').setup({ - org_agenda_files = {'~/nc/Org/agenda.org'}, - org_default_notes_file = '~/nc/Org/notes.org', -}) -- PLUGINS -- Only required if you have packer configured as `opt` @@ -229,27 +192,79 @@ return require('packer').startup(function() -- Packer can manage itself use 'wbthomason/packer.nvim' - -- A nice start screen for nvim + -- Dashboard is a nice start screen for nvim use 'glepnir/dashboard-nvim' - -- Telescope and treesitter + -- Telescope use { 'nvim-telescope/telescope.nvim', tag = '0.1.0', requires = { {'nvim-lua/plenary.nvim'} } } - use { "nvim-telescope/telescope-file-browser.nvim" } - use {'nvim-treesitter/nvim-treesitter'} + + -- Telescope File Browser + use { "nvim-telescope/telescope-file-browser.nvim", + config = function() + require("telescope").setup { + extensions = { + file_browser = { + theme = "ivy", + -- disables netrw and use telescope-file-browser in its place + hijack_netrw = true, + mappings = { + ["i"] = { + -- your custom insert mode mappings + }, + ["n"] = { + -- your custom normal mode mappings + }, + }, + }, + }, + } + end + } + require("telescope").load_extension "file_browser" + + -- Treesitter + use {'nvim-treesitter/nvim-treesitter', + config = function() + 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, + additional_vim_regex_highlighting = {'org'}, -- Required for spellcheck, some LaTex highlights and code block highlights that do not have ts grammar + }, + ensure_installed = {'org'}, -- Or run :TSUpdate org + } + end + } -- Org mode in nvim??? - use {'nvim-orgmode/orgmode', config = function() - require('orgmode').setup{} - end + use {'nvim-orgmode/orgmode', + config = function() + require('orgmode').setup{ + org_agenda_files = {'~/nc/Org/agenda.org'}, + org_default_notes_file = '~/nc/Org/notes.org', + } + end + } + require('orgmode').setup_ts_grammar() + + -- Which key + use { + "folke/which-key.nvim", + config = function() + require("which-key").setup { + -- your configuration comes here + -- or leave it empty to use the default settings + } + end } -- A better status line - use { - 'nvim-lualine/lualine.nvim', - requires = { 'kyazdani42/nvim-web-devicons', opt = true } + use { 'nvim-lualine/lualine.nvim', + requires = { 'kyazdani42/nvim-web-devicons', opt = true } } -- File management --