mirror of
https://gitlab.com/dwt1/dotfiles.git
synced 2026-08-12 02:51:14 +10:00
Cleaning up nvim config.
This commit is contained in:
@@ -1,68 +0,0 @@
|
|||||||
-------------------------------------------------
|
|
||||||
-- DT'S NEOVIM CONFIGURATION
|
|
||||||
-- Neovim website: https://neovim.io/
|
|
||||||
-- DT's dotfiles: https://gitlab.com/dwt1/dotfiles
|
|
||||||
-------------------------------------------------
|
|
||||||
|
|
||||||
local status, db = pcall(require, "dashboard")
|
|
||||||
local home = os.getenv("HOME")
|
|
||||||
|
|
||||||
db.default_banner = {
|
|
||||||
"",
|
|
||||||
"",
|
|
||||||
" ███╗ ██╗ ███████╗ ██████╗ ██╗ ██╗ ██╗ ███╗ ███╗",
|
|
||||||
" ████╗ ██║ ██╔════╝██╔═══██╗ ██║ ██║ ██║ ████╗ ████║",
|
|
||||||
" ██╔██╗ ██║ █████╗ ██║ ██║ ██║ ██║ ██║ ██╔████╔██║",
|
|
||||||
" ██║╚██╗██║ ██╔══╝ ██║ ██║ ╚██╗ ██╔╝ ██║ ██║╚██╔╝██║",
|
|
||||||
" ██║ ╚████║ ███████╗╚██████╔╝ ╚████╔╝ ██║ ██║ ╚═╝ ██║",
|
|
||||||
" ╚═╝ ╚═══╝ ╚══════╝ ╚═════╝ ╚═══╝ ╚═╝ ╚═╝ ╚═╝",
|
|
||||||
"",
|
|
||||||
" [ TIP: To exit Neovim, just power off your computer. ] ",
|
|
||||||
"",
|
|
||||||
}
|
|
||||||
-- linux
|
|
||||||
--db.preview_command = 'ueberzug'
|
|
||||||
--
|
|
||||||
--db.preview_file_path = home .. '/.config/nvim/static/neovim.cat'
|
|
||||||
db.preview_file_height = 11
|
|
||||||
db.preview_file_width = 70
|
|
||||||
db.custom_center = {
|
|
||||||
{
|
|
||||||
icon = " ",
|
|
||||||
desc = "Recent sessions ",
|
|
||||||
shortcut = "SPC s l",
|
|
||||||
action = "SessionLoad",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
icon = " ",
|
|
||||||
desc = "Find recent files ",
|
|
||||||
action = "Telescope oldfiles",
|
|
||||||
shortcut = "SPC f r",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
icon = " ",
|
|
||||||
desc = "Find files ",
|
|
||||||
action = "Telescope find_files find_command=rg,--hidden,--files",
|
|
||||||
shortcut = "SPC f f",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
icon = " ",
|
|
||||||
desc = "File browser ",
|
|
||||||
action = "Telescope file_browser",
|
|
||||||
shortcut = "SPC f b",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
icon = " ",
|
|
||||||
desc = "Find word ",
|
|
||||||
action = "Telescope live_grep",
|
|
||||||
shortcut = "SPC f w",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
icon = " ",
|
|
||||||
desc = "Load new theme ",
|
|
||||||
action = "Telescope colorscheme",
|
|
||||||
shortcut = "SPC h t",
|
|
||||||
},
|
|
||||||
}
|
|
||||||
db.custom_footer = { "", "🎉 If I'm using Neovim, then my Emacs config must be broken!" }
|
|
||||||
db.session_directory = "/home/dt/.config/nvim/session"
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
-------------------------------------------------
|
|
||||||
-- DT'S NEOVIM CONFIGURATION
|
|
||||||
-- Neovim website: https://neovim.io/
|
|
||||||
-- DT's dotfiles: https://gitlab.com/dwt1/dotfiles
|
|
||||||
-------------------------------------------------
|
|
||||||
|
|
||||||
local status, orgmode = pcall(require, "orgmode")
|
|
||||||
if not status then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
orgmode.setup({
|
|
||||||
org_agenda_files = { "~/nc/Org/agenda.org" },
|
|
||||||
org_default_notes_file = "~/nc/Org/notes.org",
|
|
||||||
})
|
|
||||||
|
|
||||||
orgmode.setup_ts_grammar()
|
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
-------------------------------------------------
|
|
||||||
-- DT'S NEOVIM CONFIGURATION
|
|
||||||
-- Neovim website: https://neovim.io/
|
|
||||||
-- DT's dotfiles: https://gitlab.com/dwt1/dotfiles
|
|
||||||
-------------------------------------------------
|
|
||||||
--
|
|
||||||
local status, telescope = pcall(require, "telescope")
|
|
||||||
if not status then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
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
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
telescope.load_extension("file_browser")
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
-------------------------------------------------
|
|
||||||
-- DT'S NEOVIM CONFIGURATION
|
|
||||||
-- Neovim website: https://neovim.io/
|
|
||||||
-- DT's dotfiles: https://gitlab.com/dwt1/dotfiles
|
|
||||||
-------------------------------------------------
|
|
||||||
|
|
||||||
local status, ts = pcall(require, "nvim-treesitter.configs")
|
|
||||||
if not status then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
ts.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", "lua" }, -- Or run :TSUpdate org
|
|
||||||
})
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
-------------------------------------------------
|
|
||||||
-- DT'S NEOVIM CONFIGURATION
|
|
||||||
-- Neovim website: https://neovim.io/
|
|
||||||
-- DT's dotfiles: https://gitlab.com/dwt1/dotfiles
|
|
||||||
-------------------------------------------------
|
|
||||||
|
|
||||||
local status, which_key = pcall(require, "which-key")
|
|
||||||
if not status then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
which_key.setup({
|
|
||||||
-- your configuration comes here
|
|
||||||
-- or leave it empty to use the default settings
|
|
||||||
})
|
|
||||||
@@ -23,8 +23,26 @@ packer.startup(function(use)
|
|||||||
use("wbthomason/packer.nvim")
|
use("wbthomason/packer.nvim")
|
||||||
|
|
||||||
-- Dashboard is a nice start screen for nvim
|
-- Dashboard is a nice start screen for nvim
|
||||||
use("glepnir/dashboard-nvim")
|
use {
|
||||||
|
'nvimdev/dashboard-nvim',
|
||||||
|
event = 'VimEnter',
|
||||||
|
config = function()
|
||||||
|
require('dashboard').setup {
|
||||||
|
-- config
|
||||||
|
theme = "hyper",
|
||||||
|
config = {
|
||||||
|
week_header = {
|
||||||
|
enable = true,
|
||||||
|
},
|
||||||
|
shortcut = {},
|
||||||
|
footer = {'',
|
||||||
|
'I Miss Emacs Already!'
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
requires = {'nvim-tree/nvim-web-devicons'}
|
||||||
|
}
|
||||||
-- Telescope
|
-- Telescope
|
||||||
use({
|
use({
|
||||||
"nvim-telescope/telescope.nvim",
|
"nvim-telescope/telescope.nvim",
|
||||||
|
|||||||
Reference in New Issue
Block a user