Cleaning up the nvim config.

This commit is contained in:
Derek Taylor
2022-09-04 17:01:48 -05:00
parent 750f096ed9
commit aa4c6e07b2
+53 -38
View File
@@ -121,7 +121,10 @@ end
map('i', '<C-E>', '<ESC>A') map('i', '<C-E>', '<ESC>A')
map('i', '<C-A>', '<ESC>I') map('i', '<C-A>', '<ESC>I')
-- Load recent sessions
map('n', '<leader>sl', '<CMD>SessionLoad<CR>') map('n', '<leader>sl', '<CMD>SessionLoad<CR>')
-- Keybindings for telescope
map('n', '<leader>fr', '<CMD>Telescope oldfiles<CR>') map('n', '<leader>fr', '<CMD>Telescope oldfiles<CR>')
map('n', '<leader>ff', '<CMD>Telescope find_files<CR>') map('n', '<leader>ff', '<CMD>Telescope find_files<CR>')
map('n', '<leader>fb', '<CMD>Telescope file_browser<CR>') map('n', '<leader>fb', '<CMD>Telescope file_browser<CR>')
@@ -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 -- linux
@@ -179,9 +182,28 @@ db.custom_center = {
} }
db.custom_footer = { '', '🎉 If I\'m using Neovim, then my Emacs config must be broken!' } db.custom_footer = { '', '🎉 If I\'m using Neovim, then my Emacs config must be broken!' }
-- TELESCOPE FILE BROWSER -- To get telescope-file-browser loaded and working with telescope,
---- You don't need to set any of these options. -- you need to call load_extension, somewhere after setup function:
-- IMPORTANT!: this is only a showcase of how you can set default options!
-- PLUGINS
-- Only required if you have packer configured as `opt`
-- vim.cmd [[packadd packer.nvim]]
return require('packer').startup(function()
-- Packer can manage itself
use 'wbthomason/packer.nvim'
-- Dashboard is a nice start screen for nvim
use 'glepnir/dashboard-nvim'
-- Telescope
use {
'nvim-telescope/telescope.nvim', tag = '0.1.0',
requires = { {'nvim-lua/plenary.nvim'} }
}
-- Telescope File Browser
use { "nvim-telescope/telescope-file-browser.nvim",
config = function()
require("telescope").setup { require("telescope").setup {
extensions = { extensions = {
file_browser = { file_browser = {
@@ -199,56 +221,49 @@ require("telescope").setup {
}, },
}, },
} }
-- To get telescope-file-browser loaded and working with telescope, end
-- you need to call load_extension, somewhere after setup function: }
require("telescope").load_extension "file_browser" require("telescope").load_extension "file_browser"
-- ORGMODE -- Treesitter
-- Load custom tree-sitter grammar for org filetype use {'nvim-treesitter/nvim-treesitter',
require('orgmode').setup_ts_grammar() config = function()
-- Tree-sitter configuration
require'nvim-treesitter.configs'.setup { 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 -- If TS highlights are not enabled at all, or disabled via `disable` prop,
-- highlighting will fallback to default Vim syntax highlighting
highlight = { highlight = {
enable = true, enable = true,
additional_vim_regex_highlighting = {'org'}, -- Required for spellcheck, some LaTex highlights and code block highlights that do not have ts grammar 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 ensure_installed = {'org'}, -- Or run :TSUpdate org
} }
end
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`
-- vim.cmd [[packadd packer.nvim]]
return require('packer').startup(function()
-- Packer can manage itself
use 'wbthomason/packer.nvim'
-- A nice start screen for nvim
use 'glepnir/dashboard-nvim'
-- Telescope and treesitter
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'}
-- Org mode in nvim??? -- Org mode in nvim???
use {'nvim-orgmode/orgmode', config = function() use {'nvim-orgmode/orgmode',
require('orgmode').setup{} 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 end
} }
-- A better status line -- A better status line
use { use { 'nvim-lualine/lualine.nvim',
'nvim-lualine/lualine.nvim',
requires = { 'kyazdani42/nvim-web-devicons', opt = true } requires = { 'kyazdani42/nvim-web-devicons', opt = true }
} }