mirror of
https://gitlab.com/dwt1/dotfiles.git
synced 2026-08-10 18:11:13 +10:00
Cleaning up the nvim config.
This commit is contained in:
+66
-51
@@ -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,48 +182,8 @@ 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
|
|
||||||
---- 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,
|
-- To get telescope-file-browser loaded and working with telescope,
|
||||||
-- you need to call load_extension, somewhere after setup function:
|
-- 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
|
-- PLUGINS
|
||||||
-- Only required if you have packer configured as `opt`
|
-- Only required if you have packer configured as `opt`
|
||||||
@@ -229,27 +192,79 @@ return require('packer').startup(function()
|
|||||||
-- Packer can manage itself
|
-- Packer can manage itself
|
||||||
use 'wbthomason/packer.nvim'
|
use 'wbthomason/packer.nvim'
|
||||||
|
|
||||||
-- A nice start screen for nvim
|
-- Dashboard is a nice start screen for nvim
|
||||||
use 'glepnir/dashboard-nvim'
|
use 'glepnir/dashboard-nvim'
|
||||||
|
|
||||||
-- Telescope and treesitter
|
-- Telescope
|
||||||
use {
|
use {
|
||||||
'nvim-telescope/telescope.nvim', tag = '0.1.0',
|
'nvim-telescope/telescope.nvim', tag = '0.1.0',
|
||||||
requires = { {'nvim-lua/plenary.nvim'} }
|
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???
|
-- Org mode in nvim???
|
||||||
use {'nvim-orgmode/orgmode', config = function()
|
use {'nvim-orgmode/orgmode',
|
||||||
require('orgmode').setup{}
|
config = function()
|
||||||
end
|
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
|
-- 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 }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
-- File management --
|
-- File management --
|
||||||
|
|||||||
Reference in New Issue
Block a user