feat: refactor

This commit is contained in:
max_richter 2022-04-25 16:23:14 +02:00
parent 4bf6a46a85
commit b0e54888bb
16 changed files with 369 additions and 371 deletions

View File

@ -1,21 +1,21 @@
background #000000 background #f8f8f8
foreground #fffaf3 foreground #2a2b33
cursor #ffffff cursor #bbbbbb
selection_background #002a3a selection_background #ececec
color0 #222222 color0 #000000
color8 #444444 color8 #000000
color1 #ff000f color1 #de3d35
color9 #ff273f color9 #de3d35
color2 #8ce00a color2 #3e953a
color10 #abe05a color10 #3e953a
color3 #ffb900 color3 #d2b67b
color11 #ffd141 color11 #d2b67b
color4 #008df8 color4 #2f5af3
color12 #0092ff color12 #2f5af3
color5 #6c43a5 color5 #950095
color13 #9a5feb color13 #a00095
color6 #00d7eb color6 #3e953a
color14 #67ffef color14 #3e953a
color7 #ffffff color7 #bbbbbb
color15 #ffffff color15 #ffffff
selection_foreground #0d0f18 selection_foreground #f8f8f8

View File

@ -495,7 +495,7 @@ window_padding_width 10
#: Fade the text in inactive windows by the specified amount (a number #: Fade the text in inactive windows by the specified amount (a number
#: between zero and one, with zero being fully faded). #: 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 #: Hide the window decorations (title-bar and window borders) with
#: yes. On macOS, titlebar-only can be used to only hide the titlebar. #: 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 # BEGIN_KITTY_THEME
# Argonaut # Atom One Light
include current-theme.conf include current-theme.conf
# END_KITTY_THEME # END_KITTY_THEME

View File

@ -495,7 +495,7 @@ window_padding_width 10
#: Fade the text in inactive windows by the specified amount (a number #: Fade the text in inactive windows by the specified amount (a number
#: between zero and one, with zero being fully faded). #: 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 #: Hide the window decorations (title-bar and window borders) with
#: yes. On macOS, titlebar-only can be used to only hide the titlebar. #: 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 # BEGIN_KITTY_THEME
# Atom One Light # Argonaut
include current-theme.conf include current-theme.conf
# END_KITTY_THEME # END_KITTY_THEME

View File

@ -0,0 +1,4 @@
local map = vim.api.nvim_set_keymap
map("i", "<C-b>", ">a**<esc><i**<esc>", { noremap = true })

View File

@ -1,21 +1,8 @@
require("utils.install-packer") require("utils.install-packer")
local u = require("utils") local u = require("utils")
require("core.plugins") if u.has_plugin("packer") then
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"
local packer = require("packer") local packer = require("packer")
-- Have packer use a popup window
packer.init { packer.init {
display = { display = {
open_fn = function() 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.command-center"
require "configs.notify" require "configs.notify"
require "configs.lsp" require "configs.lsp"
require "configs.lspinstaller" require "configs.lspinstaller"
require "configs.telescope" require "configs.telescope"
require "configs.tree" require "configs.tree"
require "configs.treesitter"
-- Enable Theming / Syntax require "configs.autocomplete"
require("nightfox").setup({ require "configs.snippets"
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 "overlays" 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() 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 else
vim.cmd [[PackerSync]] vim.cmd [[PackerSync]]
vim.cmd [[echo Installed -> Reload]] vim.cmd [[echo Installed -> Reload]]

View 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)

View File

@ -2,49 +2,49 @@ local lsp = require "lspconfig"
local lsp_status = require("lsp-status") local lsp_status = require("lsp-status")
-- local ts_utils = require("nvim-lsp-ts-utils") -- local ts_utils = require("nvim-lsp-ts-utils")
require'nvim-lightbulb'.setup { require 'nvim-lightbulb'.setup {
-- LSP client names to ignore -- LSP client names to ignore
-- Example: {"sumneko_lua", "null-ls"} -- Example: {"sumneko_lua", "null-ls"}
ignore = {}, ignore = {},
sign = { sign = {
enabled = true, enabled = true,
-- Priority of the gutter sign -- Priority of the gutter sign
priority = 10, priority = 10,
}, },
float = { float = {
enabled = false, enabled = false,
-- Text to show in the popup float -- Text to show in the popup float
text = "💡", text = "💡",
-- Available keys for window options: -- Available keys for window options:
-- - height of floating window -- - height of floating window
-- - width of floating window -- - width of floating window
-- - wrap_at character to wrap at for computing height -- - wrap_at character to wrap at for computing height
-- - max_width maximal width of floating window -- - max_width maximal width of floating window
-- - max_height maximal height of floating window -- - max_height maximal height of floating window
-- - pad_left number of columns to pad contents at left -- - pad_left number of columns to pad contents at left
-- - pad_right number of columns to pad contents at right -- - pad_right number of columns to pad contents at right
-- - pad_top number of lines to pad contents at top -- - pad_top number of lines to pad contents at top
-- - pad_bottom number of lines to pad contents at bottom -- - pad_bottom number of lines to pad contents at bottom
-- - offset_x x-axis offset of the floating window -- - offset_x x-axis offset of the floating window
-- - offset_y y-axis offset of the floating window -- - offset_y y-axis offset of the floating window
-- - anchor corner of float to place at the cursor (NW, NE, SW, SE) -- - anchor corner of float to place at the cursor (NW, NE, SW, SE)
-- - winblend transparency of the window (0-100) -- - winblend transparency of the window (0-100)
win_opts = {}, win_opts = {},
}, },
virtual_text = { virtual_text = {
enabled = false, enabled = false,
-- Text to show at virtual text -- Text to show at virtual text
text = "💡", text = "💡",
-- highlight mode to use for virtual text (replace, combine, blend), see :help nvim_buf_set_extmark() for reference -- highlight mode to use for virtual text (replace, combine, blend), see :help nvim_buf_set_extmark() for reference
hl_mode = "replace", hl_mode = "replace",
}, },
status_text = { status_text = {
enabled = false, enabled = false,
-- Text to provide when code actions are available -- Text to provide when code actions are available
text = "💡", text = "💡",
-- Text to provide when no actions are available -- Text to provide when no actions are available
text_unavailable = "" text_unavailable = ""
} }
} }
@ -53,30 +53,29 @@ table.insert(runtime_path, "lua/?.lua")
table.insert(runtime_path, "lua/?/init.lua") table.insert(runtime_path, "lua/?/init.lua")
lsp.sumneko_lua.setup { lsp.sumneko_lua.setup {
settings = { settings = {
Lua = { Lua = {
runtime = { runtime = {
-- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim) -- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim)
version = "LuaJIT", version = "LuaJIT",
-- Setup your lua path -- Setup your lua path
path = runtime_path path = runtime_path
}, },
diagnostics = { diagnostics = {
-- Get the language server to recognize the `vim` global -- Get the language server to recognize the `vim` global
globals = {"vim"} globals = { "vim" }
}, },
workspace = { workspace = {
-- Make the server aware of Neovim runtime files -- Make the server aware of Neovim runtime files
library = vim.api.nvim_get_runtime_file("", true) library = vim.api.nvim_get_runtime_file("", true)
}, },
-- Do not send telemetry data containing a randomized but unique identifier -- Do not send telemetry data containing a randomized but unique identifier
telemetry = { telemetry = {
enable = false enable = false
} }
}
} }
}
} }
-- Ltex Language Server -- Ltex Language Server
require("grammar-guard").init() require("grammar-guard").init()

View 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("}"),
})
})

View File

@ -22,10 +22,9 @@ augroup SaveManualFolds
augroup END augroup END
]] ]]
vim.cmd [[autocmd CursorHold,CursorHoldI * lua require'nvim-lightbulb'.update_lightbulb()]]
vim.api.nvim_create_autocmd("BufWritePre", {
vim.api.nvim_create_autocmd("BufWritePre",{
callback = function() callback = function()
vim.lsp.buf.formatting_sync(); vim.lsp.buf.formatting_sync();
end end

View File

@ -1,14 +1,14 @@
local map = vim.api.nvim_set_keymap local map = vim.api.nvim_set_keymap
local g = vim.g local g = vim.g
local options = {noremap = true} local options = { noremap = true }
local remap = {noremap = false} local remap = { noremap = false }
g.mapleader = " " g.mapleader = " "
map("n", "<C-o>", ":Telescope find_files<CR>", options) map("n", "<C-o>", ":Telescope find_files<CR>", options)
map("n", "<C-f>", ":Telescope live_grep<CR>", options) map("n", "<C-f>", ":Telescope live_grep<CR>", options)
map("n","<C-p>",":Telescope command_center<CR>",options) map("n", "<C-p>", ":Telescope command_center<CR>", options)
map("n", "<Shift>", "za", options) map("n", "<Shift>", "za", options)
-- LSP Functionality -- LSP Functionality
@ -32,16 +32,21 @@ map("n", "<C-k>", "<C-w>k", options)
map("n", "<C-l>", "<C-w>l", options) map("n", "<C-l>", "<C-w>l", options)
-- Browser like next/previous -- Browser like next/previous
map("n", "<A-Left>", ":bprevious<CR>",options); map("n", "<A-Left>", ":bprevious<CR>", options);
map("n", "<A-Right>", ":bnext<CR>",options); map("n", "<A-Right>", ":bnext<CR>", options);
-- Backspace Delete like Browser -- Backspace Delete like Browser
map('i', '<C-H>', '<Esc>caw', options) 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>k", "{", options)
map("n", "<Leader>j", "}", 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 -- Move lines vscode style
map("n", "<A-j>", "<cmd>move +1<CR>", options) map("n", "<A-j>", "<cmd>move +1<CR>", options)
map("n", "<A-k>", "<cmd>move -2<CR>", options) map("n", "<A-k>", "<cmd>move -2<CR>", options)
@ -60,8 +65,8 @@ map("n", "<Leader>gdh", ":diffget //2<CR>", options)
-- Find file in NvimTree -- Find file in NvimTree
map("n", "<Leader>f", ":NvimTreeFindFile<CR><c-w>", options) map("n", "<Leader>f", ":NvimTreeFindFile<CR><c-w>", options)
map("n", "<C-->",":vsplit<CR>",options); map("n", "<C-->", ":vsplit<CR>", options);
map("n", "<C-|>",":split<CR>",options); map("n", "<C-|>", ":split<CR>", options);
-- I aint no weak boy -- I aint no weak boy
map("n", "<Left>", ":echo 'No Left for you'<CR><i><dw>", options) map("n", "<Left>", ":echo 'No Left for you'<CR><i><dw>", options)

View File

@ -1,63 +1,62 @@
------------- -------------
-- General -- -- General --
------------- -------------
local set = vim.opt local set = vim.opt
set.swapfile = false -- Don't use swapfile set.swapfile = false -- Don't use swapfile
set.updatetime = 0 -- Faster completion set.updatetime = 0 -- Faster completion
set.encoding="utf-8" -- The encoding displayed set.encoding = "utf-8" -- The encoding displayed
set.fileencoding="utf-8" -- The encoding written to file set.fileencoding = "utf-8" -- The encoding written to file
set.smartindent = true -- Makes indenting smart set.smartindent = true -- Makes indenting smart
set.iskeyword:append("-") -- treat dash separated words as a word text object" set.iskeyword:append("-") -- treat dash separated words as a word text object"
set.clipboard = "unnamedplus" -- Copy paste between vim and everything else set.clipboard = "unnamedplus" -- Copy paste between vim and everything else
set.smarttab = true -- Makes tabbing smarter will realize you have 2 vs 4 set.smarttab = true -- Makes tabbing smarter will realize you have 2 vs 4
set.expandtab = true -- Converts tabs to spaces set.expandtab = true -- Converts tabs to spaces
set.autoindent = true -- Good auto indent set.autoindent = true -- Good auto indent
set.autochdir = true -- Your working directory will always be the same as your working directory set.autochdir = true -- Your working directory will always be the same as your working directory
set.incsearch = true -- sets incremental search set.incsearch = true -- sets incremental search
set.shell = "/bin/zsh" -- Set your shell to bash or zsh set.shell = "/bin/zsh" -- Set your shell to bash or zsh
set.shortmess:append "sI" -- Disable nvim intro set.shortmess:append "sI" -- Disable nvim intro
vim.cmd [[set nobackup]] -- creates a backup file vim.cmd [[set nobackup]] -- creates a backup file
vim.cmd [[set nowritebackup]] -- creates a backup file i guess vim.cmd [[set nowritebackup]] -- creates a backup file i guess
vim.cmd [[set formatoptions-=cro]] -- Stop newline continution of comments vim.cmd [[set formatoptions-=cro]] -- Stop newline continution of comments
vim.cmd [[set complete+=kspell]] -- auto complete with spellcheck vim.cmd [[set complete+=kspell]] -- auto complete with spellcheck
vim.cmd [[set completeopt=menuone,longest]] -- auto complete menu (It's pretty great) vim.cmd [[set completeopt=menuone,longest]] -- auto complete menu (It's pretty great)
vim.cmd [[set nocompatible]] -- Disable compatibility to old-time vi vim.cmd [[set nocompatible]] -- Disable compatibility to old-time vi
set.mouse = 'a' -- Enable mouse support set.mouse = 'a' -- Enable mouse support
--------------- ---------------
-- Neovim UI -- -- Neovim UI --
--------------- ---------------
set.pumheight = 15 -- Makes popup menu smaller set.pumheight = 15 -- Makes popup menu smaller
set.ruler = true -- Show the cursor position all the time set.ruler = true -- Show the cursor position all the time
set.splitbelow = true -- Horizontal splits will automatically be below set.splitbelow = true -- Horizontal splits will automatically be below
set.splitright = true -- Vertical splits will automatically be to the right set.splitright = true -- Vertical splits will automatically be to the right
set.conceallevel = 0 -- So that I can see `` in markdown files set.conceallevel = 0 -- So that I can see `` in markdown files
set.tabstop = 2 -- Insert 2 spaces for a tab set.tabstop = 2 -- Insert 2 spaces for a tab
set.number = true -- Line numbers set.number = true -- Line numbers
set.background = "dark" -- tell vim what the background color looks like set.background = "dark" -- tell vim what the background color looks like
set.virtualedit = "onemore" -- With This option you can move the cursor one character over the end set.virtualedit = "onemore" -- With This option you can move the cursor one character over the end
set.ignorecase = true -- ignores case when searching set.ignorecase = true -- ignores case when searching
set.smartcase = true -- turns on case sensitive search when letters are capitalized set.smartcase = true -- turns on case sensitive search when letters are capitalized
set.termguicolors = true -- set term gui colors (most terminals support this) set.termguicolors = true -- set term gui colors (most terminals support this)
set.laststatus=2 -- Always display the status line set.laststatus = 2 -- Always display the status line
set.title = true -- Show current txt that you editing set.title = true -- Show current txt that you editing
set.relativenumber = false -- Vims absolute, relative and hybrid line numbers set.relativenumber = false -- Vims absolute, relative and hybrid line numbers
set.cursorline = false -- Enable highlighting of the current line set.cursorline = false -- Enable highlighting of the current line
set.shiftwidth = 2 -- Change the number of space characters inserted for indentation set.shiftwidth = 2 -- Change the number of space characters inserted for indentation
set.showtabline = 1 -- Always show tabs set.showtabline = 1 -- Always show tabs
set.cmdheight = 1 -- More space for displaying messages set.cmdheight = 1 -- More space for displaying messages
vim.cmd [[set nowrap]] -- Display long lines as just one line vim.cmd [[set nowrap]] -- Display long lines as just one line
vim.cmd [[set noshowmode]] -- We don't need to see things like -- INSERT -- anymore vim.cmd [[set noshowmode]] -- We don't need to see things like -- INSERT -- anymore
vim.cmd [[syntax enable]] -- Enables syntax highlighing vim.cmd [[syntax enable]] -- Enables syntax highlighing
vim.cmd [[set t_Co=256]] -- Support 256 colors vim.cmd [[set t_Co=256]] -- Support 256 colors
-- vim.cmd "set whichwrap+=<,>,[,],h,l" -- Breaks Space-Time Continuum -- vim.cmd "set whichwrap+=<,>,[,],h,l" -- Breaks Space-Time Continuum
----------------- -----------------
-- Memory, CPU -- -- Memory, CPU --
----------------- -----------------
set.hidden = true -- Required to keep multiple buffers open multiple buffers set.hidden = true -- Required to keep multiple buffers open multiple buffers
set.timeoutlen = 500 -- By default timeoutlen is 1000 ms set.timeoutlen = 500 -- By default timeoutlen is 1000 ms
set.lazyredraw = true -- Disable lazyredraw set.lazyredraw = true -- Disable lazyredraw
set.synmaxcol = 240 -- Max column for syntax highlight set.synmaxcol = 240 -- Max column for syntax highlight
set.updatetime = 700 -- ms to wait for trigger an event set.updatetime = 700 -- ms to wait for trigger an event

View File

@ -1,96 +1,79 @@
return require("packer").startup( return require("packer").startup(
function(use) function(use)
-- Let packer manage itself -- Let packer manage itself
use "wbthomason/packer.nvim" use "wbthomason/packer.nvim"
use 'lewis6991/impatient.nvim'
use 'lewis6991/impatient.nvim' -- General Helper Functions
use "nvim-lua/plenary.nvim"
-- General Helper Functions -- Theming Section
use "nvim-lua/plenary.nvim" use "EdenEast/nightfox.nvim"
use "nvim-lualine/lualine.nvim"
-- Filetype Detection -- Layout Plugins
-- use "nathom/filetype.nvim" use "kyazdani42/nvim-web-devicons"
use "kyazdani42/nvim-tree.lua"
use "nvim-lua/popup.nvim"
-- use "mhinz/vim-startify"
use 'goolord/alpha-nvim'
use { "terrortylor/nvim-comment", config = function() require('nvim_comment').setup() end }
use "windwp/nvim-autopairs"
-- Theming Section -- Code Navigation
-- use 'folke/tokyonight.nvim' use "junegunn/fzf"
use "EdenEast/nightfox.nvim" use "nvim-telescope/telescope.nvim"
use "nvim-lualine/lualine.nvim" use "gfeiyou/command-center.nvim"
-- use "xiyaowong/nvim-transparent"
-- Layout Plugins -- Postman like features
use "kyazdani42/nvim-web-devicons" -- use "NTBBloodbath/rest.nvim"
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 "windwp/nvim-autopairs"
-- Code Navigation -- Obsidian / Roam like features
-- use "alexghergh/nvim-tmux-navigation" -- use "lervag/wiki.vim"
-- use "dense-analysis/ale"
-- use "nathanmsmith/nvim-ale-diagnostic"
use "junegunn/fzf"
use "nvim-telescope/telescope.nvim"
use "gfeiyou/command-center.nvim"
-- Postman like features use "rcarriga/nvim-notify"
-- use "NTBBloodbath/rest.nvim"
-- Obsidian / Roam like features -- Lsp Errors
-- use "lervag/wiki.vim" use "folke/lsp-colors.nvim"
use "kosayoda/nvim-lightbulb"
use "rcarriga/nvim-notify" use {
"folke/trouble.nvim",
-- Lsp Errors requires = "kyazdani42/nvim-web-devicons",
use "folke/lsp-colors.nvim" config = function()
use "kosayoda/nvim-lightbulb" require("trouble").setup {}
-- use "onsails/lspkind-nvim"
use {
"folke/trouble.nvim",
requires = "kyazdani42/nvim-web-devicons",
config = function()
require("trouble").setup {}
end
}
-- Syntax / Autocomplete
-- use "terminalnode/sway-vim-syntax" --sway config syntax
use "neovim/nvim-lspconfig"
use "hrsh7th/nvim-cmp"
use "hrsh7th/cmp-nvim-lsp"
use "hrsh7th/cmp-nvim-lua"
use "hrsh7th/cmp-path"
use "hrsh7th/cmp-calc"
use "hrsh7th/cmp-buffer"
use "hrsh7th/cmp-cmdline"
use "rafamadriz/friendly-snippets"
use "L3MON4D3/LuaSnip"
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",
run = ":TSUpdate"
}
-- Autoformat
-- use "sbdchd/neoformat"
use "lukas-reineke/lsp-format.nvim"
-- use "lukas-reineke/format.nvim"
-- General Popup Window
use "akinsho/nvim-toggleterm.lua"
use "rktjmp/fwatch.nvim"
-- Database Feature
use "tpope/vim-dadbod"
use "kristijanhusak/vim-dadbod-ui"
end end
}
-- Syntax / Autocomplete
use "neovim/nvim-lspconfig"
use "hrsh7th/nvim-cmp"
use "hrsh7th/cmp-nvim-lsp"
use "hrsh7th/cmp-nvim-lua"
use "hrsh7th/cmp-path"
use "hrsh7th/cmp-calc"
use "hrsh7th/cmp-buffer"
use "hrsh7th/cmp-cmdline"
use "rafamadriz/friendly-snippets"
use "L3MON4D3/LuaSnip"
use "saadparwaiz1/cmp_luasnip"
use "williamboman/nvim-lsp-installer"
use "nvim-lua/lsp-status.nvim"
use "brymer-meneses/grammar-guard.nvim"
use {
"nvim-treesitter/nvim-treesitter",
run = ":TSUpdate"
}
-- Autoformat
use "lukas-reineke/lsp-format.nvim"
-- General Popup Window
use "akinsho/nvim-toggleterm.lua"
use "rktjmp/fwatch.nvim"
-- Database Feature
use "tpope/vim-dadbod"
use "kristijanhusak/vim-dadbod-ui"
end
) )

View 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"

View File

@ -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("}"),
})
})

View File

@ -1,7 +1,5 @@
local fn = vim.fn local fn = vim.fn
local install_path = fn.stdpath('data') .. '/site/pack/packer/start/packer.nvim' local install_path = fn.stdpath('data') .. '/site/pack/packer/start/packer.nvim'
if fn.empty(fn.glob(install_path)) > 0 then if fn.empty(fn.glob(install_path)) > 0 then
fn.system({'git', 'clone', '--depth=1', 'https://github.com/wbthomason/packer.nvim', install_path}) fn.system({ 'git', 'clone', '--depth=1', 'https://github.com/wbthomason/packer.nvim', install_path })
end end