chore(nvim): Some clean up
- Start splitting plugins to their own files - Config should be loaded first - Config for plugins should be handled by lazy.nvim
This commit is contained in:
parent
e69acc9844
commit
f7c5370f5b
4 changed files with 89 additions and 87 deletions
|
@ -8,5 +8,3 @@ o.relativenumber = true
|
||||||
|
|
||||||
g.mapleader = " "
|
g.mapleader = " "
|
||||||
g.guifont = { "Sarasa UI J", ":h16" }
|
g.guifont = { "Sarasa UI J", ":h16" }
|
||||||
|
|
||||||
require("oil").setup()
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
-- vim_plug
|
|
||||||
require("null.plug")
|
|
||||||
-- vim_uni
|
-- vim_uni
|
||||||
require("null.config")
|
require("null.config")
|
||||||
|
-- vim_plug
|
||||||
|
require("null.plug")
|
||||||
-- vim_nix
|
-- vim_nix
|
||||||
require("null.nix") -- n*x specific stuff
|
require("null.nix") -- n*x specific stuff
|
||||||
|
|
|
@ -1,85 +1,3 @@
|
||||||
local util = require("null.util")
|
local util = require("null.util")
|
||||||
|
|
||||||
util.getch_lazy_nvim().setup({
|
util.getch_lazy_nvim().setup("null.plugins")
|
||||||
{
|
|
||||||
-- FIXME: Use my own colourscheme
|
|
||||||
"folke/tokyonight.nvim",
|
|
||||||
lazy = false,
|
|
||||||
priority = 1000,
|
|
||||||
config = function()
|
|
||||||
-- load the colorscheme here
|
|
||||||
vim.cmd([[colorscheme tokyonight]])
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"nvim-lualine/lualine.nvim",
|
|
||||||
dependencies = { "nvim-tree/nvim-web-devicons" },
|
|
||||||
config = function()
|
|
||||||
require("lualine").setup {
|
|
||||||
options = {
|
|
||||||
theme = "tokyonight" -- FIXME: Use my own colourscheme
|
|
||||||
}
|
|
||||||
}
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"nvim-neo-tree/neo-tree.nvim", -- I'll be using oil.nvim, but for better visual I'll keep this
|
|
||||||
keys = {
|
|
||||||
{ "<C-n>", "<cmd>Neotree toggle<cr>", desc = "NeoTree" },
|
|
||||||
},
|
|
||||||
branch = "v3.x",
|
|
||||||
dependencies = {
|
|
||||||
"nvim-lua/plenary.nvim",
|
|
||||||
"nvim-tree/nvim-web-devicons",
|
|
||||||
"MunifTanjim/nui.nvim",
|
|
||||||
},
|
|
||||||
config = function ()
|
|
||||||
require("neo-tree").setup({
|
|
||||||
close_if_last_window = true,
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"stevearc/oil.nvim",
|
|
||||||
opts = {},
|
|
||||||
dependencies = { "nvim-tree/nvim-web-devicons" },
|
|
||||||
},
|
|
||||||
"tpope/vim-commentary", -- shortcut to comment a line
|
|
||||||
{
|
|
||||||
"dstein64/vim-startuptime",
|
|
||||||
cmd = "StartupTime", -- Note to self: lazy load on command
|
|
||||||
init = function()
|
|
||||||
-- Note to self: init is called during startup. Configuration for vim plugins typically should be set in an init function
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
|
|
||||||
-- Syntax Highlighting stuff
|
|
||||||
{
|
|
||||||
"nvim-treesitter/nvim-treesitter",
|
|
||||||
opts = {
|
|
||||||
ensure_installed = {
|
|
||||||
"gsp",
|
|
||||||
},
|
|
||||||
|
|
||||||
highlight = {
|
|
||||||
enable = true,
|
|
||||||
additional_vim_regex_highlighting = false,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
config = function(_, opts)
|
|
||||||
local config = require("nvim-treesitter.parsers").get_parser_configs()
|
|
||||||
config.gsp = {
|
|
||||||
install_info = {
|
|
||||||
url = "https://git.sr.ht/~mango/tree-sitter-gsp",
|
|
||||||
files = {"src/parser.c"},
|
|
||||||
},
|
|
||||||
filetype = "gsp",
|
|
||||||
}
|
|
||||||
require("nvim-treesitter.configs").setup(opts)
|
|
||||||
end
|
|
||||||
},
|
|
||||||
{
|
|
||||||
url = "https://git.sr.ht/~mango/tree-sitter-gsp",
|
|
||||||
fp = "gsp",
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
86
.config/nvim/lua/null/plugins/init.lua
Normal file
86
.config/nvim/lua/null/plugins/init.lua
Normal file
|
@ -0,0 +1,86 @@
|
||||||
|
return {
|
||||||
|
{
|
||||||
|
-- FIXME: Use my own colourscheme
|
||||||
|
"folke/tokyonight.nvim",
|
||||||
|
lazy = false,
|
||||||
|
priority = 1000,
|
||||||
|
config = function ()
|
||||||
|
-- load the colorscheme here
|
||||||
|
vim.cmd([[colorscheme tokyonight]])
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"nvim-lualine/lualine.nvim",
|
||||||
|
dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||||
|
config = function ()
|
||||||
|
require("lualine").setup {
|
||||||
|
options = {
|
||||||
|
theme = "tokyonight" -- FIXME: Use my own colourscheme
|
||||||
|
}
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"nvim-neo-tree/neo-tree.nvim", -- I'll be using oil.nvim, but for better visual I'll keep this
|
||||||
|
keys = {
|
||||||
|
{ "<C-n>", "<cmd>Neotree toggle<cr>", desc = "NeoTree" },
|
||||||
|
},
|
||||||
|
branch = "v3.x",
|
||||||
|
dependencies = {
|
||||||
|
"nvim-lua/plenary.nvim",
|
||||||
|
"nvim-tree/nvim-web-devicons",
|
||||||
|
"MunifTanjim/nui.nvim",
|
||||||
|
},
|
||||||
|
config = function ()
|
||||||
|
require("neo-tree").setup({
|
||||||
|
close_if_last_window = true,
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"stevearc/oil.nvim",
|
||||||
|
opts = {},
|
||||||
|
dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||||
|
config = function ()
|
||||||
|
require("oil").setup()
|
||||||
|
end
|
||||||
|
},
|
||||||
|
"tpope/vim-commentary", -- shortcut to comment a line
|
||||||
|
{
|
||||||
|
"dstein64/vim-startuptime",
|
||||||
|
cmd = "StartupTime", -- Note to self: lazy load on command
|
||||||
|
init = function ()
|
||||||
|
-- Note to self: init is called during startup. Configuration for vim plugins typically should be set in an init function
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
-- Syntax Highlighting stuff
|
||||||
|
{
|
||||||
|
"nvim-treesitter/nvim-treesitter",
|
||||||
|
opts = {
|
||||||
|
ensure_installed = {
|
||||||
|
"gsp",
|
||||||
|
},
|
||||||
|
|
||||||
|
highlight = {
|
||||||
|
enable = true,
|
||||||
|
additional_vim_regex_highlighting = false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
config = function (_, opts)
|
||||||
|
local config = require("nvim-treesitter.parsers").get_parser_configs()
|
||||||
|
config.gsp = {
|
||||||
|
install_info = {
|
||||||
|
url = "https://git.sr.ht/~mango/tree-sitter-gsp",
|
||||||
|
files = {"src/parser.c"},
|
||||||
|
},
|
||||||
|
filetype = "gsp",
|
||||||
|
}
|
||||||
|
require("nvim-treesitter.configs").setup(opts)
|
||||||
|
end
|
||||||
|
},
|
||||||
|
{
|
||||||
|
url = "https://git.sr.ht/~mango/tree-sitter-gsp",
|
||||||
|
fp = "gsp",
|
||||||
|
},
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue