Cleaning up the nvim config.

This commit is contained in:
Derek Taylor 2022-09-04 17:01:48 -05:00
parent 750f096ed9
commit aa4c6e07b2
1 changed files with 66 additions and 51 deletions

View File

@ -121,7 +121,10 @@ end
map('i', '<C-E>', '<ESC>A')
map('i', '<C-A>', '<ESC>I')
-- Load recent sessions
map('n', '<leader>sl', '<CMD>SessionLoad<CR>')
-- Keybindings for telescope
map('n', '<leader>fr', '<CMD>Telescope oldfiles<CR>')
map('n', '<leader>ff', '<CMD>Telescope find_files<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
@ -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 --