feat: refactor
This commit is contained in:
parent
4bf6a46a85
commit
b0e54888bb
@ -1,21 +1,21 @@
|
||||
background #000000
|
||||
foreground #fffaf3
|
||||
cursor #ffffff
|
||||
selection_background #002a3a
|
||||
color0 #222222
|
||||
color8 #444444
|
||||
color1 #ff000f
|
||||
color9 #ff273f
|
||||
color2 #8ce00a
|
||||
color10 #abe05a
|
||||
color3 #ffb900
|
||||
color11 #ffd141
|
||||
color4 #008df8
|
||||
color12 #0092ff
|
||||
color5 #6c43a5
|
||||
color13 #9a5feb
|
||||
color6 #00d7eb
|
||||
color14 #67ffef
|
||||
color7 #ffffff
|
||||
background #f8f8f8
|
||||
foreground #2a2b33
|
||||
cursor #bbbbbb
|
||||
selection_background #ececec
|
||||
color0 #000000
|
||||
color8 #000000
|
||||
color1 #de3d35
|
||||
color9 #de3d35
|
||||
color2 #3e953a
|
||||
color10 #3e953a
|
||||
color3 #d2b67b
|
||||
color11 #d2b67b
|
||||
color4 #2f5af3
|
||||
color12 #2f5af3
|
||||
color5 #950095
|
||||
color13 #a00095
|
||||
color6 #3e953a
|
||||
color14 #3e953a
|
||||
color7 #bbbbbb
|
||||
color15 #ffffff
|
||||
selection_foreground #0d0f18
|
||||
selection_foreground #f8f8f8
|
||||
|
@ -495,7 +495,7 @@ window_padding_width 10
|
||||
#: Fade the text in inactive windows by the specified amount (a number
|
||||
#: between zero and one, with zero being fully faded).
|
||||
|
||||
# hide_window_decorations no
|
||||
hide_window_decorations yes
|
||||
|
||||
#: Hide the window decorations (title-bar and window borders) with
|
||||
#: yes. On macOS, titlebar-only can be used to only hide the titlebar.
|
||||
@ -1314,6 +1314,6 @@ map kitty_mod+minus change_font_size all -2.0
|
||||
|
||||
|
||||
# BEGIN_KITTY_THEME
|
||||
# Argonaut
|
||||
# Atom One Light
|
||||
include current-theme.conf
|
||||
# END_KITTY_THEME
|
||||
|
@ -495,7 +495,7 @@ window_padding_width 10
|
||||
#: Fade the text in inactive windows by the specified amount (a number
|
||||
#: between zero and one, with zero being fully faded).
|
||||
|
||||
# hide_window_decorations no
|
||||
hide_window_decorations yes
|
||||
|
||||
#: Hide the window decorations (title-bar and window borders) with
|
||||
#: yes. On macOS, titlebar-only can be used to only hide the titlebar.
|
||||
@ -1314,6 +1314,6 @@ map kitty_mod+minus change_font_size all -2.0
|
||||
|
||||
|
||||
# BEGIN_KITTY_THEME
|
||||
# Atom One Light
|
||||
# Argonaut
|
||||
include current-theme.conf
|
||||
# END_KITTY_THEME
|
||||
|
4
configs/nvim/ftplugin/markdown.lua
Normal file
4
configs/nvim/ftplugin/markdown.lua
Normal file
@ -0,0 +1,4 @@
|
||||
local map = vim.api.nvim_set_keymap
|
||||
|
||||
|
||||
map("i", "<C-b>", ">a**<esc><i**<esc>", { noremap = true })
|
@ -1,21 +1,8 @@
|
||||
require("utils.install-packer")
|
||||
|
||||
local u = require("utils")
|
||||
require("core.plugins")
|
||||
|
||||
local g = vim.g
|
||||
local cmd = vim.cmd
|
||||
|
||||
if u.has_plugin("cmp") then
|
||||
require "impatient"
|
||||
|
||||
require "core.options"
|
||||
require "core.autocommands"
|
||||
require "core.keymappings"
|
||||
|
||||
if u.has_plugin("packer") then
|
||||
local packer = require("packer")
|
||||
|
||||
-- Have packer use a popup window
|
||||
packer.init {
|
||||
display = {
|
||||
open_fn = function()
|
||||
@ -24,69 +11,28 @@ if u.has_plugin("cmp") then
|
||||
},
|
||||
}
|
||||
|
||||
require "core.plugins"
|
||||
require "impatient"
|
||||
|
||||
require "core.options"
|
||||
require "core.autocommands"
|
||||
require "core.keymappings"
|
||||
require "core.theme"
|
||||
|
||||
require "configs.dashboard"
|
||||
require "configs.command-center"
|
||||
require "configs.notify"
|
||||
require "configs.lsp"
|
||||
require "configs.lspinstaller"
|
||||
require "configs.telescope"
|
||||
require "configs.tree"
|
||||
|
||||
-- Enable Theming / Syntax
|
||||
require("nightfox").setup({
|
||||
options = {
|
||||
transparent = true
|
||||
}
|
||||
})
|
||||
cmd("colorscheme nightfox")
|
||||
require "utils.theme-reloader"
|
||||
require "configs.lualine"
|
||||
|
||||
-- Configure Wiki
|
||||
g.wiki_root = "~/Notes"
|
||||
g.wiki_filetypes = { "md" }
|
||||
g.wiki_link_extension = ".md"
|
||||
require "configs.treesitter"
|
||||
require "configs.autocomplete"
|
||||
require "configs.snippets"
|
||||
|
||||
require "overlays"
|
||||
|
||||
-- require "nvim-tmux-navigation".setup {
|
||||
-- keybindings = {
|
||||
-- left = "<C-h>",
|
||||
-- down = "<C-j>",
|
||||
-- up = "<C-k>",
|
||||
-- right = "<C-l>",
|
||||
-- last_active = "<C-\\>",
|
||||
-- next = "<C-Space>"
|
||||
-- }
|
||||
-- }
|
||||
|
||||
require "nvim-autopairs".setup()
|
||||
|
||||
-- Treesitter config
|
||||
require "configs.treesitter"
|
||||
|
||||
-- Autocompletion Setup
|
||||
require "snippets"
|
||||
require "configs.autocomplete"
|
||||
|
||||
-- Setup rest.vim
|
||||
-- require("rest-nvim").setup(
|
||||
-- {
|
||||
-- -- Open request results in a horizontal split
|
||||
-- result_split_horizontal = false,
|
||||
-- -- Skip SSL verification, useful for unknown certificates
|
||||
-- skip_ssl_verification = false,
|
||||
-- -- Highlight request on run
|
||||
-- highlight = {
|
||||
-- enabled = true,
|
||||
-- timeout = 150
|
||||
-- },
|
||||
-- -- Jump to request line on run
|
||||
-- jump_to_request = false
|
||||
-- }
|
||||
-- )
|
||||
|
||||
-- LSP Config
|
||||
-- require "lsp-conf"
|
||||
else
|
||||
vim.cmd [[PackerSync]]
|
||||
vim.cmd [[echo Installed -> Reload]]
|
||||
|
56
configs/nvim/lua/configs/dashboard.lua
Normal file
56
configs/nvim/lua/configs/dashboard.lua
Normal file
@ -0,0 +1,56 @@
|
||||
-----------------------------------
|
||||
-- Welcome Screen Configuration --
|
||||
-----------------------------------
|
||||
|
||||
-- Call Alpha With A pcall
|
||||
local status_ok, alpha = pcall(require, "alpha")
|
||||
if not status_ok then
|
||||
return
|
||||
end
|
||||
|
||||
-- Enable Alpha Dashboard
|
||||
local dashboard = require("alpha.themes.dashboard")
|
||||
|
||||
-- Remove These ~ ~ ~
|
||||
vim.opt.fillchars:append { eob = " " }
|
||||
|
||||
-- Disable Status Line so that alpha dashboard look nice
|
||||
vim.cmd [[ au User AlphaReady if winnr('$') == 1 | set laststatus=1 ]]
|
||||
|
||||
-- Custom Footer
|
||||
dashboard.section.footer.val = {
|
||||
"Write Programs That Do One Thing And Do It Well.",
|
||||
}
|
||||
|
||||
-- Custom Section
|
||||
dashboard.section.buttons.val = {
|
||||
dashboard.button("n", " Create New file", ":set laststatus=3 | :ene <BAR> startinsert <CR>"),
|
||||
dashboard.button("e", " Open File Manager", ":set laststatus=3 | :NvimTreeOpen <CR>"),
|
||||
dashboard.button("v", " Neovim Settings ", ":set laststatus=3 | e ~/.config/nvim/init.lua <CR>"),
|
||||
dashboard.button("b", "⟳ Recent Files", ":Telescope oldfiles<CR>"),
|
||||
dashboard.button("s", " Shell Configuration", ":set laststatus=3 | e ~/.config/zsh/.zshrc <CR>"),
|
||||
dashboard.button("u", " Update Nvim Plugins", ":PackerUpdate <CR>"),
|
||||
dashboard.button("q", " Quit Neovim", ":qa<CR>"),
|
||||
}
|
||||
|
||||
-- LuaVim Ascii Art
|
||||
dashboard.section.header.val = {
|
||||
[[███╗ ███╗ █████╗ ██╗ ██╗ ███╗ ██╗ ██╗ ██╗██╗███╗ ███╗]],
|
||||
[[████╗ ████║██╔══██╗╚██╗██╔╝ ████╗ ██║ ██║ ██║██║████╗ ████║]],
|
||||
[[██╔████╔██║███████║ ╚███╔╝ ██╔██╗ ██║ ██║ ██║██║██╔████╔██║]],
|
||||
[[██║╚██╔╝██║██╔══██║ ██╔██╗ ██║╚██╗██║ ╚██╗ ██╔╝██║██║╚██╔╝██║]],
|
||||
[[██║ ╚═╝ ██║██║ ██║██╔╝ ██╗ ██║ ╚████║ ╚████╔╝ ██║██║ ╚═╝ ██║]],
|
||||
[[╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚═╝ ╚═══╝ ╚═══╝ ╚═╝╚═╝ ╚═╝]],
|
||||
}
|
||||
|
||||
-- Layout For Luavim ascii art
|
||||
dashboard.config.layout = {
|
||||
{ type = "padding", val = 5 },
|
||||
dashboard.section.header,
|
||||
{ type = "padding", val = 2 },
|
||||
dashboard.section.buttons,
|
||||
{ type = "padding", val = 1 },
|
||||
dashboard.section.footer,
|
||||
}
|
||||
|
||||
alpha.setup(dashboard.opts)
|
@ -79,4 +79,3 @@ lsp.sumneko_lua.setup {
|
||||
|
||||
-- Ltex Language Server
|
||||
require("grammar-guard").init()
|
||||
|
||||
|
65
configs/nvim/lua/configs/snippets.lua
Normal file
65
configs/nvim/lua/configs/snippets.lua
Normal file
@ -0,0 +1,65 @@
|
||||
local ls = require("luasnip")
|
||||
|
||||
-- some shorthands...
|
||||
local s = ls.snippet
|
||||
local sn = ls.snippet_node
|
||||
local t = ls.text_node
|
||||
local i = ls.insert_node
|
||||
local f = ls.function_node
|
||||
local c = ls.choice_node
|
||||
local d = ls.dynamic_node
|
||||
|
||||
local types = require("luasnip.util.types")
|
||||
|
||||
require("luasnip.loaders.from_vscode").load({ include = { "typescript", "javascript", "html" } })
|
||||
|
||||
-- Every unspecified option will be set to the default.
|
||||
ls.config.set_config(
|
||||
{
|
||||
history = true,
|
||||
-- Update more often, :h events for more info.
|
||||
updateevents = "TextChanged,TextChangedI",
|
||||
ext_opts = {
|
||||
[types.choiceNode] = {
|
||||
active = {
|
||||
virt_text = { { "choiceNode", "Comment" } }
|
||||
}
|
||||
}
|
||||
},
|
||||
-- treesitter-hl has 100, use something higher (default is 200).
|
||||
ext_base_prio = 300,
|
||||
-- minimal increase in priority.
|
||||
ext_prio_increase = 1,
|
||||
enable_autosnippets = true
|
||||
}
|
||||
)
|
||||
|
||||
ls.add_snippets("all", {
|
||||
s({ trig = "b(%d)", regTrig = true, wordTrig = true }, {
|
||||
f(function(args) return { "Captured Text: " .. args[1].captures[1] .. "." } end, {}),
|
||||
i(0)
|
||||
})
|
||||
})
|
||||
|
||||
ls.add_snippets("svelte", {
|
||||
s("slt", {
|
||||
t('<script lang="ts">', '\t'),
|
||||
i(0),
|
||||
t("</script>")
|
||||
}),
|
||||
s("sc", {
|
||||
t('<script context="module" lang="ts">', '\t'),
|
||||
i(0),
|
||||
t("</script>")
|
||||
})
|
||||
})
|
||||
|
||||
ls.add_snippets("typescript", {
|
||||
s("sget", {
|
||||
t('export async function get({'),
|
||||
i(1, "params"),
|
||||
t("}) {"),
|
||||
i(2),
|
||||
t("}"),
|
||||
})
|
||||
})
|
@ -22,8 +22,7 @@ augroup SaveManualFolds
|
||||
augroup END
|
||||
]]
|
||||
|
||||
|
||||
|
||||
vim.cmd [[autocmd CursorHold,CursorHoldI * lua require'nvim-lightbulb'.update_lightbulb()]]
|
||||
|
||||
vim.api.nvim_create_autocmd("BufWritePre", {
|
||||
callback = function()
|
||||
|
@ -38,10 +38,15 @@ map("n", "<A-Right>", ":bnext<CR>",options);
|
||||
-- Backspace Delete like Browser
|
||||
map('i', '<C-H>', '<Esc>caw', options)
|
||||
|
||||
map("n", "Y", "yy", options)
|
||||
-- Copy visual selection to keyboard
|
||||
map("v", "Y", '"+y', options)
|
||||
map("n", "<Leader>k", "{", options)
|
||||
map("n", "<Leader>j", "}", options)
|
||||
|
||||
-- Don't accidently create macros when trying to quit
|
||||
map('n', 'Q', 'q', {})
|
||||
map('n', 'q', '<nop>', {})
|
||||
|
||||
-- Move lines vscode style
|
||||
map("n", "<A-j>", "<cmd>move +1<CR>", options)
|
||||
map("n", "<A-k>", "<cmd>move -2<CR>", options)
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
-------------
|
||||
-- General --
|
||||
-------------
|
||||
|
@ -2,36 +2,25 @@ return require("packer").startup(
|
||||
function(use)
|
||||
-- Let packer manage itself
|
||||
use "wbthomason/packer.nvim"
|
||||
|
||||
use 'lewis6991/impatient.nvim'
|
||||
|
||||
-- General Helper Functions
|
||||
use "nvim-lua/plenary.nvim"
|
||||
|
||||
-- Filetype Detection
|
||||
-- use "nathom/filetype.nvim"
|
||||
|
||||
-- Theming Section
|
||||
-- use 'folke/tokyonight.nvim'
|
||||
use "EdenEast/nightfox.nvim"
|
||||
use "nvim-lualine/lualine.nvim"
|
||||
-- use "xiyaowong/nvim-transparent"
|
||||
|
||||
-- Layout Plugins
|
||||
use "kyazdani42/nvim-web-devicons"
|
||||
use "kyazdani42/nvim-tree.lua"
|
||||
use "nvim-lua/popup.nvim"
|
||||
use "mhinz/vim-startify"
|
||||
-- use "tpope/vim-fugitive"
|
||||
use "tpope/vim-commentary"
|
||||
-- use "tpope/vim-surround"
|
||||
-- use "lambdalisue/suda.vim"
|
||||
-- use "mhinz/vim-startify"
|
||||
use 'goolord/alpha-nvim'
|
||||
use { "terrortylor/nvim-comment", config = function() require('nvim_comment').setup() end }
|
||||
use "windwp/nvim-autopairs"
|
||||
|
||||
-- Code Navigation
|
||||
-- use "alexghergh/nvim-tmux-navigation"
|
||||
-- use "dense-analysis/ale"
|
||||
-- use "nathanmsmith/nvim-ale-diagnostic"
|
||||
use "junegunn/fzf"
|
||||
use "nvim-telescope/telescope.nvim"
|
||||
use "gfeiyou/command-center.nvim"
|
||||
@ -47,7 +36,6 @@ return require("packer").startup(
|
||||
-- Lsp Errors
|
||||
use "folke/lsp-colors.nvim"
|
||||
use "kosayoda/nvim-lightbulb"
|
||||
-- use "onsails/lspkind-nvim"
|
||||
use {
|
||||
"folke/trouble.nvim",
|
||||
requires = "kyazdani42/nvim-web-devicons",
|
||||
@ -57,7 +45,6 @@ return require("packer").startup(
|
||||
}
|
||||
|
||||
-- Syntax / Autocomplete
|
||||
-- use "terminalnode/sway-vim-syntax" --sway config syntax
|
||||
use "neovim/nvim-lspconfig"
|
||||
use "hrsh7th/nvim-cmp"
|
||||
use "hrsh7th/cmp-nvim-lsp"
|
||||
@ -71,8 +58,6 @@ return require("packer").startup(
|
||||
use "saadparwaiz1/cmp_luasnip"
|
||||
use "williamboman/nvim-lsp-installer"
|
||||
use "nvim-lua/lsp-status.nvim"
|
||||
-- use "jose-elias-alvarez/nvim-lsp-ts-utils"
|
||||
-- use "neoclide/jsonc.vim"
|
||||
use "brymer-meneses/grammar-guard.nvim"
|
||||
use {
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
@ -80,9 +65,7 @@ return require("packer").startup(
|
||||
}
|
||||
|
||||
-- Autoformat
|
||||
-- use "sbdchd/neoformat"
|
||||
use "lukas-reineke/lsp-format.nvim"
|
||||
-- use "lukas-reineke/format.nvim"
|
||||
|
||||
-- General Popup Window
|
||||
use "akinsho/nvim-toggleterm.lua"
|
||||
|
9
configs/nvim/lua/core/theme.lua
Normal file
9
configs/nvim/lua/core/theme.lua
Normal file
@ -0,0 +1,9 @@
|
||||
-- Enable Theming / Syntax
|
||||
require("nightfox").setup({
|
||||
options = {
|
||||
transparent = true
|
||||
}
|
||||
})
|
||||
vim.cmd("colorscheme nightfox")
|
||||
require "utils.theme-reloader"
|
||||
require "configs.lualine"
|
@ -1,65 +0,0 @@
|
||||
local ls = require("luasnip")
|
||||
|
||||
-- some shorthands...
|
||||
local s = ls.snippet
|
||||
local sn = ls.snippet_node
|
||||
local t = ls.text_node
|
||||
local i = ls.insert_node
|
||||
local f = ls.function_node
|
||||
local c = ls.choice_node
|
||||
local d = ls.dynamic_node
|
||||
|
||||
local types = require("luasnip.util.types")
|
||||
|
||||
require("luasnip.loaders.from_vscode").load({include = {"typescript", "javascript", "html"}})
|
||||
|
||||
-- Every unspecified option will be set to the default.
|
||||
ls.config.set_config(
|
||||
{
|
||||
history = true,
|
||||
-- Update more often, :h events for more info.
|
||||
updateevents = "TextChanged,TextChangedI",
|
||||
ext_opts = {
|
||||
[types.choiceNode] = {
|
||||
active = {
|
||||
virt_text = {{"choiceNode", "Comment"}}
|
||||
}
|
||||
}
|
||||
},
|
||||
-- treesitter-hl has 100, use something higher (default is 200).
|
||||
ext_base_prio = 300,
|
||||
-- minimal increase in priority.
|
||||
ext_prio_increase = 1,
|
||||
enable_autosnippets = true
|
||||
}
|
||||
)
|
||||
|
||||
ls.add_snippets("all", {
|
||||
s({trig = "b(%d)", regTrig = true, wordTrig = true}, {
|
||||
f(function(args) return {"Captured Text: " .. args[1].captures[1] .. "."} end, {}),
|
||||
i(0)
|
||||
})
|
||||
})
|
||||
|
||||
ls.add_snippets("svelte",{
|
||||
s("slt",{
|
||||
t('<script lang="ts">','\t'),
|
||||
i(0),
|
||||
t("</script>")
|
||||
}),
|
||||
s("sc",{
|
||||
t('<script context="module" lang="ts">','\t'),
|
||||
i(0),
|
||||
t("</script>")
|
||||
})
|
||||
})
|
||||
|
||||
ls.add_snippets("typescript",{
|
||||
s("sget",{
|
||||
t('export async function get({'),
|
||||
i(1,"params"),
|
||||
t("}) {"),
|
||||
i(2),
|
||||
t("}"),
|
||||
})
|
||||
})
|
@ -1,7 +1,5 @@
|
||||
local fn = vim.fn
|
||||
|
||||
local install_path = fn.stdpath('data') .. '/site/pack/packer/start/packer.nvim'
|
||||
|
||||
if fn.empty(fn.glob(install_path)) > 0 then
|
||||
fn.system({ 'git', 'clone', '--depth=1', 'https://github.com/wbthomason/packer.nvim', install_path })
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user