feat: replace some plugins
This commit is contained in:
parent
c756bf993f
commit
7ec4c850d3
@ -2,6 +2,7 @@
|
||||
"$schema": "https://raw.githubusercontent.com/sumneko/vscode-lua/master/setting/schema.json",
|
||||
"Lua.diagnostics.globals": [
|
||||
"require",
|
||||
"vim"
|
||||
"vim",
|
||||
"pcall"
|
||||
]
|
||||
}
|
@ -30,7 +30,7 @@ bind -Tcopy-mode WheelDownPane send -N1 -X scroll-down
|
||||
set -g mode-keys vi
|
||||
|
||||
# Enable mouse mode (tmux 2.1 and above)
|
||||
set -g mouse on
|
||||
set -g mouse off
|
||||
|
||||
bind h select-pane -L
|
||||
bind j select-pane -D
|
||||
|
@ -7,7 +7,7 @@ if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]
|
||||
fi
|
||||
|
||||
ZSH_THEME="powerlevel10k/powerlevel10k"
|
||||
ZSH_TMUX_AUTOSTART=true
|
||||
# ZSH_TMUX_AUTOSTART=true
|
||||
ZSH_TMUX_AUTOCONNECT=false
|
||||
|
||||
plugins=(
|
||||
@ -89,7 +89,7 @@ fi
|
||||
|
||||
# Auto connect to tmux session of ssh
|
||||
if [[ -n "$PS1" ]] && [[ -z "$TMUX" ]] && [[ -n "$SSH_CONNECTION" ]]; then
|
||||
tmux attach-session -t $USER || tmux new-session -s $USER
|
||||
# tmux attach-session -t $USER || tmux new-session -s $USER
|
||||
fi
|
||||
|
||||
export PNPM_HOME="$HOME/.local/share/pnpm"
|
||||
|
@ -1,29 +1,35 @@
|
||||
local has_impatient, impatient = pcall(require, "impatient")
|
||||
if has_impatient then
|
||||
impatient.enable_profile()
|
||||
impatient.enable_profile()
|
||||
end
|
||||
|
||||
require "core.plugins"
|
||||
require("core.plugins")
|
||||
|
||||
local status_ok = pcall(require, "nightfox")
|
||||
if not status_ok then
|
||||
return
|
||||
return
|
||||
end
|
||||
|
||||
require("hologram").setup({
|
||||
auto_display = true, -- WIP automatic markdown image display, may be prone to breaking
|
||||
})
|
||||
|
||||
require "core.options"
|
||||
require "core.autocommands"
|
||||
require "core.theme"
|
||||
require "core.keymappings"
|
||||
-- Require and call setup function somewhere in your init.lua
|
||||
|
||||
require "configs.dashboard"
|
||||
require "configs.command-center"
|
||||
require "configs.notify"
|
||||
require "configs.lsp"
|
||||
require "configs.telescope"
|
||||
require "configs.tree"
|
||||
require "configs.treesitter"
|
||||
require "configs.autocomplete"
|
||||
require "configs.snippets"
|
||||
require("core.options")
|
||||
require("core.autocommands")
|
||||
require("core.theme")
|
||||
require("core.keymappings")
|
||||
|
||||
require "overlays"
|
||||
require("configs.dashboard")
|
||||
require("configs.dap")
|
||||
require("configs.command-center")
|
||||
require("configs.notify")
|
||||
require("configs.lsp")
|
||||
require("configs.telescope")
|
||||
require("configs.tree")
|
||||
require("configs.treesitter")
|
||||
require("configs.autocomplete")
|
||||
require("configs.snippets")
|
||||
|
||||
require("overlays")
|
||||
|
@ -1,9 +1,11 @@
|
||||
-- luasnip setup
|
||||
local luasnip = require "luasnip"
|
||||
local lspkind = require "lspkind"
|
||||
local cmp = require "cmp"
|
||||
local luasnip = require("luasnip")
|
||||
local lspkind = require("lspkind")
|
||||
local cmp = require("cmp")
|
||||
local cmp_autopairs = require("nvim-autopairs.completion.cmp")
|
||||
local compare = require('cmp.config.compare')
|
||||
local compare = require("cmp.config.compare")
|
||||
local cmp_buffer = require("cmp_buffer")
|
||||
local tabnine = require("cmp_tabnine.config")
|
||||
|
||||
local source_mapping = {
|
||||
buffer = "[Buffer]",
|
||||
@ -13,62 +15,41 @@ local source_mapping = {
|
||||
path = "[Path]",
|
||||
}
|
||||
|
||||
local tabnine = require('cmp_tabnine.config')
|
||||
tabnine:setup({
|
||||
max_lines = 1000;
|
||||
max_num_results = 20;
|
||||
sort = true;
|
||||
run_on_every_keystroke = true;
|
||||
snippet_placeholder = '..';
|
||||
max_lines = 1000,
|
||||
max_num_results = 20,
|
||||
sort = true,
|
||||
run_on_every_keystroke = true,
|
||||
snippet_placeholder = "..",
|
||||
ignored_file_types = { -- default is not to ignore
|
||||
-- uncomment to ignore in lua:
|
||||
-- lua = true
|
||||
};
|
||||
show_prediction_strength = false;
|
||||
},
|
||||
show_prediction_strength = false,
|
||||
})
|
||||
|
||||
cmp.setup {
|
||||
-- formatting = {
|
||||
-- format = lspkind.cmp_format(
|
||||
-- {
|
||||
-- with_text = true,
|
||||
-- menu = ({
|
||||
-- buffer = "[Buffer]",
|
||||
-- nvim_lsp = "[LSP]",
|
||||
-- luasnip = "[LuaSnip]",
|
||||
-- nvim_lua = "[Lua]",
|
||||
-- latex_symbols = "[Latex]"
|
||||
-- })
|
||||
-- }
|
||||
-- )
|
||||
-- },
|
||||
cmp.setup({
|
||||
sorting = {
|
||||
priority_weight = 2,
|
||||
comparators = {
|
||||
require('cmp_tabnine.compare'),
|
||||
compare.offset,
|
||||
compare.exact,
|
||||
compare.score,
|
||||
compare.recently_used,
|
||||
compare.kind,
|
||||
compare.sort_text,
|
||||
compare.length,
|
||||
compare.order,
|
||||
compare.offset,
|
||||
},
|
||||
},
|
||||
experimental = {
|
||||
ghost_text = true
|
||||
ghost_text = true,
|
||||
},
|
||||
completion = {
|
||||
completeopt = "menu,menuone"
|
||||
completeopt = "menu,menuone",
|
||||
},
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
luasnip.lsp_expand(args.body)
|
||||
end
|
||||
end,
|
||||
},
|
||||
mapping = {
|
||||
["<C-Leader>"] = cmp.mapping.complete(),
|
||||
["<C-Leader>"] = cmp.mapping.complete({}),
|
||||
["<Tab>"] = function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_next_item()
|
||||
@ -83,68 +64,58 @@ cmp.setup {
|
||||
fallback()
|
||||
end
|
||||
end,
|
||||
["<CR>"] = cmp.mapping.confirm(
|
||||
{
|
||||
behavior = cmp.ConfirmBehavior.Replace,
|
||||
select = true
|
||||
}
|
||||
)
|
||||
["<CR>"] = cmp.mapping.confirm({
|
||||
behavior = cmp.ConfirmBehavior.Replace,
|
||||
select = true,
|
||||
}),
|
||||
},
|
||||
formatting = {
|
||||
format = function(entry, vim_item)
|
||||
vim_item.kind = lspkind.presets.default[vim_item.kind]
|
||||
local menu = source_mapping[entry.source.name]
|
||||
if entry.source.name == 'cmp_tabnine' then
|
||||
if entry.source.name == "cmp_tabnine" then
|
||||
if entry.completion_item.data ~= nil and entry.completion_item.data.detail ~= nil then
|
||||
menu = entry.completion_item.data.detail .. ' ' .. menu
|
||||
menu = entry.completion_item.data.detail .. " " .. menu
|
||||
end
|
||||
vim_item.kind = ''
|
||||
vim_item.kind = ""
|
||||
end
|
||||
vim_item.menu = menu
|
||||
return vim_item
|
||||
end
|
||||
end,
|
||||
},
|
||||
sources = {
|
||||
{ name = "nvim_lua" },
|
||||
{ name = "nvim_lsp" },
|
||||
{ name = "cmp_tabnine" },
|
||||
{ name = "cmp_tabnine", max_item_count = 3 },
|
||||
{ name = "luasnip" },
|
||||
{ name = "path" },
|
||||
{ name = "buffer" },
|
||||
{ name = "calc" }
|
||||
}
|
||||
}
|
||||
{ name = "buffer", max_item_count = 3 },
|
||||
{ name = "calc" },
|
||||
-- { name = 'copilot' }
|
||||
},
|
||||
})
|
||||
|
||||
-- Use buffer source for `/` (if you enabled `native_menu`, this won't work anymore).
|
||||
cmp.setup.cmdline(
|
||||
"/",
|
||||
{
|
||||
sources = {
|
||||
{ name = "buffer" }
|
||||
}
|
||||
}
|
||||
)
|
||||
cmp.setup.cmdline("/", {
|
||||
sources = {
|
||||
{ name = "buffer" },
|
||||
},
|
||||
})
|
||||
|
||||
-- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore).
|
||||
cmp.setup.cmdline(
|
||||
":",
|
||||
{
|
||||
sources = cmp.config.sources(
|
||||
{
|
||||
{ name = "path" }
|
||||
},
|
||||
{
|
||||
{ name = "cmdline" }
|
||||
}
|
||||
)
|
||||
}
|
||||
)
|
||||
cmp.setup.cmdline(":", {
|
||||
sources = cmp.config.sources({
|
||||
{ name = "path" },
|
||||
}, {
|
||||
{ name = "cmdline" },
|
||||
}),
|
||||
})
|
||||
|
||||
-- The nvim-cmp almost supports LSP's capabilities so You should advertise it to LSP servers..
|
||||
-- Setup lspconfig.
|
||||
local capabilities = require("cmp_nvim_lsp").update_capabilities(vim.lsp.protocol.make_client_capabilities())
|
||||
require "lspconfig".html.setup {
|
||||
capabilities = capabilities
|
||||
}
|
||||
require("lspconfig").html.setup({
|
||||
capabilities = capabilities,
|
||||
})
|
||||
|
||||
cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done({ map_char = { tex = "" } }))
|
||||
|
34
configs/nvim/lua/configs/dap.lua
Normal file
34
configs/nvim/lua/configs/dap.lua
Normal file
@ -0,0 +1,34 @@
|
||||
local dap, dapui = require("dap"), require("dapui")
|
||||
|
||||
dap.listeners.after.event_initialized["dapui_config"] = function()
|
||||
dapui.open()
|
||||
end
|
||||
dap.listeners.before.event_terminated["dapui_config"] = function()
|
||||
dapui.close()
|
||||
end
|
||||
dap.listeners.before.event_exited["dapui_config"] = function()
|
||||
dapui.close()
|
||||
end
|
||||
|
||||
dap.adapters.firefox = {
|
||||
type = "executable",
|
||||
command = "node",
|
||||
options = {
|
||||
initialize_timeout_sec = 10,
|
||||
disconnect_timeout_sec = 10,
|
||||
max_retries = 30,
|
||||
},
|
||||
args = { os.getenv("HOME") .. "/.local/share/nvim/mason/packages/firefox-debug-adapter/dist/adapter.bundle.js" },
|
||||
}
|
||||
|
||||
dap.configurations.typescript = {
|
||||
{
|
||||
name = "Debug with Firefox",
|
||||
type = "firefox",
|
||||
request = "launch",
|
||||
reAttach = true,
|
||||
webRoot = "${workspaceFolder}",
|
||||
url = "http://localhost:8080",
|
||||
firefoxExecutable = "/sbin/firefox-developer-edition",
|
||||
},
|
||||
}
|
@ -1,8 +1,20 @@
|
||||
local lsp_installer = require("nvim-lsp-installer")
|
||||
lsp_installer.setup {
|
||||
ensure_installed = { "sumneko_lua", "jsonls", "tsserver", "svelte", "cssls" }
|
||||
}
|
||||
local lsp = require "lspconfig"
|
||||
local mason = require("mason")
|
||||
local mason_lsp = require("mason-lspconfig")
|
||||
local lsp = require("lspconfig")
|
||||
|
||||
require("null-ls").setup({
|
||||
sources = {
|
||||
require("null-ls").builtins.formatting.stylua,
|
||||
require("null-ls").builtins.diagnostics.eslint,
|
||||
require("null-ls").builtins.completion.spell,
|
||||
},
|
||||
})
|
||||
|
||||
mason.setup()
|
||||
|
||||
mason_lsp.setup({
|
||||
ensure_installed = { "sumneko_lua", "jsonls", "tsserver", "svelte", "cssls" },
|
||||
})
|
||||
|
||||
local runtime_path = vim.split(package.path, ";")
|
||||
table.insert(runtime_path, "lua/?.lua")
|
||||
@ -11,35 +23,32 @@ table.insert(runtime_path, "lua/?/init.lua")
|
||||
local function on_attach(client, bufnr)
|
||||
local cap = client.server_capabilities
|
||||
|
||||
if (cap.documentFormattingProvider) then
|
||||
if cap.documentFormattingProvider then
|
||||
vim.api.nvim_create_autocmd("BufWritePre", {
|
||||
buffer = bufnr,
|
||||
callback = function()
|
||||
vim.lsp.buf.format()
|
||||
|
||||
vim.lsp.buf.format();
|
||||
|
||||
if client.name == 'tsserver' or client.name == "svelte" then
|
||||
if client.name == "tsserver" or client.name == "svelte" then
|
||||
-- params for the request
|
||||
local params = {
|
||||
command = "_typescript.organizeImports",
|
||||
arguments = { vim.api.nvim_buf_get_name(bufnr) },
|
||||
title = ""
|
||||
title = "",
|
||||
}
|
||||
|
||||
-- perform a syncronous request
|
||||
-- 500ms timeout depending on the size of file a bigger timeout may be needed
|
||||
vim.lsp.buf_request_sync(bufnr, "workspace/executeCommand", params, 500)
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
end,
|
||||
})
|
||||
else
|
||||
vim.notify("Lsp (" .. client.name .. ") doesnt support format")
|
||||
-- vim.notify("Lsp (" .. client.name .. ") doesnt support format")
|
||||
end
|
||||
end
|
||||
|
||||
lsp.sumneko_lua.setup {
|
||||
lsp.sumneko_lua.setup({
|
||||
on_attach = on_attach,
|
||||
settings = {
|
||||
Lua = {
|
||||
@ -47,101 +56,118 @@ lsp.sumneko_lua.setup {
|
||||
-- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim)
|
||||
version = "LuaJIT",
|
||||
-- Setup your lua path
|
||||
path = runtime_path
|
||||
path = runtime_path,
|
||||
},
|
||||
diagnostics = {
|
||||
-- Get the language server to recognize the `vim` global
|
||||
globals = { "vim" }
|
||||
globals = { "vim" },
|
||||
},
|
||||
workspace = {
|
||||
-- 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
|
||||
telemetry = {
|
||||
enable = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
enable = false,
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
local capabilities = require("cmp_nvim_lsp").update_capabilities(vim.lsp.protocol.make_client_capabilities())
|
||||
|
||||
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||
capabilities.textDocument.completion.completionItem.snippetSupport = true
|
||||
|
||||
lsp.solargraph.setup {
|
||||
lsp.prismals.setup({
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach,
|
||||
})
|
||||
|
||||
lsp.solargraph.setup({
|
||||
filetypes = { "ruby" },
|
||||
on_attach = on_attach,
|
||||
}
|
||||
})
|
||||
|
||||
lsp.jsonls.setup {
|
||||
lsp.elixirls.setup({
|
||||
on_attach = on_attach,
|
||||
})
|
||||
|
||||
lsp.jsonls.setup({
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach,
|
||||
settings = {
|
||||
json = {
|
||||
schemas = {
|
||||
{
|
||||
description = 'TypeScript compiler configuration file',
|
||||
fileMatch = { 'tsconfig.json', 'tsconfig.*.json' },
|
||||
url = 'http://json.schemastore.org/tsconfig'
|
||||
description = "TypeScript compiler configuration file",
|
||||
fileMatch = { "tsconfig.json", "tsconfig.*.json" },
|
||||
url = "http://json.schemastore.org/tsconfig",
|
||||
},
|
||||
{
|
||||
description = 'ESLint config',
|
||||
fileMatch = { '.eslintrc.json', '.eslintrc' },
|
||||
url = 'http://json.schemastore.org/eslintrc'
|
||||
description = "ESLint config",
|
||||
fileMatch = { ".eslintrc.json", ".eslintrc" },
|
||||
url = "http://json.schemastore.org/eslintrc",
|
||||
},
|
||||
{
|
||||
description = 'Prettier config',
|
||||
fileMatch = { '.prettierrc', '.prettierrc.json', 'prettier.config.json' },
|
||||
url = 'http://json.schemastore.org/prettierrc'
|
||||
description = "Prettier config",
|
||||
fileMatch = { ".prettierrc", ".prettierrc.json", "prettier.config.json" },
|
||||
url = "http://json.schemastore.org/prettierrc",
|
||||
},
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
lsp.svelte.setup {
|
||||
on_attach = on_attach
|
||||
}
|
||||
lsp.tsserver.setup {
|
||||
on_attach = on_attach
|
||||
}
|
||||
lsp.html.setup {
|
||||
on_attach = on_attach
|
||||
}
|
||||
lsp.intelephense.setup {
|
||||
on_attach = on_attach
|
||||
}
|
||||
lsp.cssls.setup {
|
||||
on_attach = on_attach
|
||||
}
|
||||
lsp.zls.setup {
|
||||
on_attach = on_attach
|
||||
}
|
||||
lsp.bashls.setup {
|
||||
lsp.svelte.setup({
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach,
|
||||
})
|
||||
lsp.tsserver.setup({
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach,
|
||||
})
|
||||
lsp.html.setup({
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach,
|
||||
})
|
||||
lsp.intelephense.setup({
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach,
|
||||
})
|
||||
lsp.cssls.setup({
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach,
|
||||
})
|
||||
lsp.zls.setup({
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach,
|
||||
})
|
||||
lsp.bashls.setup({
|
||||
capabilities = capabilities,
|
||||
filetypes = { "sh", "bash" },
|
||||
on_attach = on_attach
|
||||
}
|
||||
on_attach = on_attach,
|
||||
})
|
||||
|
||||
-- lsp.remark_ls.setup {
|
||||
-- filetypes = { "markdown" },
|
||||
-- on_attach = on_attach
|
||||
-- }
|
||||
|
||||
lsp.ltex.setup {
|
||||
lsp.ltex.setup({
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach,
|
||||
cmd = { os.getenv("HOME") .. '/.local/share/nvim/lsp_servers/ltex/ltex-ls/bin/ltex-ls' },
|
||||
cmd = { os.getenv("HOME") .. "/.local/share/nvim/lsp_servers/ltex/ltex-ls/bin/ltex-ls" },
|
||||
settings = {
|
||||
ltex = {
|
||||
disabledRules = { ['en-US'] = { 'PROFANITY' } },
|
||||
disabledRules = { ["en-US"] = { "PROFANITY" } },
|
||||
dictionary = {
|
||||
['en-US'] = { 'perf', 'ci', 'neovim' },
|
||||
["en-US"] = { "perf", "ci", "neovim" },
|
||||
},
|
||||
hiddenFalsePositives = {
|
||||
'neovim',
|
||||
'Neovim',
|
||||
'waybar'
|
||||
}
|
||||
"neovim",
|
||||
"Neovim",
|
||||
"waybar",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
})
|
||||
|
@ -24,6 +24,9 @@ map("n", "<Leader>rn", "<cmd>lua vim.lsp.buf.rename()<CR>", options)
|
||||
map("n", "<Leader>c", "<cmd>lua vim.lsp.buf.code_action()<CR>", options)
|
||||
map("n", "<leader>t", ":TroubleToggle<CR>", remap)
|
||||
|
||||
-- DAP Functionality
|
||||
map("n", "<Leader>b", ":lua require('dap').toggle_breakpoint()", options)
|
||||
|
||||
-- Navigate Buffers
|
||||
map("n", "<C-h>", "<C-w>h", options)
|
||||
map("n", "<C-j>", "<C-w>j", options)
|
||||
@ -41,11 +44,11 @@ map("n", "<C-w>h", ":sp<CR>", remap) -- horizontal
|
||||
map("n", "<C-w>v", ":vs<CR>", remap) -- vertical
|
||||
|
||||
-- Browser like next/previous
|
||||
map("n", "<A-Left>", ":bprevious<CR>", options);
|
||||
map("n", "<A-Right>", ":bnext<CR>", options);
|
||||
map("n", "<A-Left>", ":bprevious<CR>", options)
|
||||
map("n", "<A-Right>", ":bnext<CR>", options)
|
||||
|
||||
-- Backspace Delete like Browser
|
||||
map('i', '<C-H>', '<Esc>dbxi', options)
|
||||
map("i", "<C-H>", "<Esc>dbxi", options)
|
||||
|
||||
-- Copy visual selection to keyboard
|
||||
map("v", "Y", '"+y', options)
|
||||
@ -76,8 +79,8 @@ map("n", "<Leader>gdh", ":diffget //2<CR>", options)
|
||||
-- Find file in NvimTree
|
||||
map("n", "<Leader>f", ":NvimTreeFindFile<CR><c-w>", options)
|
||||
|
||||
map("n", "<C-->", ":vsplit<CR>", options);
|
||||
map("n", "<C-|>", ":split<CR>", options);
|
||||
map("n", "<C-->", ":vsplit<CR>", options)
|
||||
map("n", "<C-|>", ":split<CR>", options)
|
||||
|
||||
-- I aint no weak boy
|
||||
map("n", "<Left>", ":echo 'No Left for you'<CR><i><dw>", options)
|
||||
|
@ -15,14 +15,14 @@ set.autoindent = true -- Good auto indent
|
||||
set.autochdir = false -- Your working directory will always be the same as your working directory
|
||||
set.incsearch = true -- sets incremental search
|
||||
set.shell = "/bin/zsh" -- Set your shell to bash or zsh
|
||||
set.shortmess:append "sI" -- Disable nvim intro
|
||||
vim.cmd [[set nobackup]] -- creates a backup file
|
||||
vim.cmd [[set nowritebackup]] -- creates a backup file i guess
|
||||
vim.cmd [[set formatoptions-=cro]] -- Stop newline continution of comments
|
||||
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 nocompatible]] -- Disable compatibility to old-time vi
|
||||
set.mouse = 'a' -- Enable mouse support
|
||||
set.shortmess:append("sI") -- Disable nvim intro
|
||||
vim.cmd([[set nobackup]]) -- creates a backup file
|
||||
vim.cmd([[set nowritebackup]]) -- creates a backup file i guess
|
||||
vim.cmd([[set formatoptions-=cro]]) -- Stop newline continution of comments
|
||||
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 nocompatible]]) -- Disable compatibility to old-time vi
|
||||
set.mouse = "a" -- Enable mouse support
|
||||
set.foldmethod = "expr"
|
||||
set.foldexpr = "nvim_treesitter#foldexpr()" -- use treesitter for folding
|
||||
vim.wo.foldlevel = 99 -- feel free to decrease the value
|
||||
@ -50,11 +50,14 @@ set.cursorline = false -- Enable highlighting of the current line
|
||||
set.shiftwidth = 2 -- Change the number of space characters inserted for indentation
|
||||
set.showtabline = 1 -- Always show tabs
|
||||
set.cmdheight = 1 -- More space for displaying messages
|
||||
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 [[syntax enable]] -- Enables syntax highlighing
|
||||
vim.cmd [[set t_Co=256]] -- Support 256 colors
|
||||
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([[syntax enable]]) -- Enables syntax highlighing
|
||||
vim.cmd([[set t_Co=256]]) -- Support 256 colors
|
||||
-- vim.cmd "set whichwrap+=<,>,[,],h,l" -- Breaks Space-Time Continuum
|
||||
vim.diagnostic.config({
|
||||
virtual_text = false,
|
||||
})
|
||||
|
||||
-----------------
|
||||
-- Memory, CPU --
|
||||
|
@ -1,103 +1,136 @@
|
||||
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"
|
||||
local packer_bootstrap = false
|
||||
if fn.empty(fn.glob(install_path)) > 0 then
|
||||
packer_bootstrap = fn.system({ 'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim',
|
||||
install_path })
|
||||
vim.cmd 'packadd packer.nvim'
|
||||
packer_bootstrap =
|
||||
fn.system({ "git", "clone", "--depth", "1", "https://github.com/wbthomason/packer.nvim", install_path })
|
||||
vim.cmd("packadd packer.nvim")
|
||||
end
|
||||
|
||||
local packer = require("packer")
|
||||
packer.init {
|
||||
display = {
|
||||
open_fn = function()
|
||||
return require("packer.util").float { border = "rounded" }
|
||||
end,
|
||||
}
|
||||
}
|
||||
packer.init({
|
||||
display = {
|
||||
open_fn = function()
|
||||
return require("packer.util").float({ border = "rounded" })
|
||||
end,
|
||||
},
|
||||
})
|
||||
|
||||
return packer.startup(function(use)
|
||||
-- Let packer manage itself
|
||||
use "wbthomason/packer.nvim"
|
||||
use 'lewis6991/impatient.nvim'
|
||||
-- Let packer manage itself
|
||||
use("wbthomason/packer.nvim")
|
||||
use("lewis6991/impatient.nvim")
|
||||
|
||||
-- General Helper Functions
|
||||
use "nvim-lua/plenary.nvim"
|
||||
-- General Helper Functions
|
||||
use("nvim-lua/plenary.nvim")
|
||||
|
||||
-- Theming Section
|
||||
use "rktjmp/fwatch.nvim" -- Used to check dark/light theme
|
||||
use "EdenEast/nightfox.nvim"
|
||||
use "nvim-lualine/lualine.nvim"
|
||||
-- Theming Section
|
||||
use("rktjmp/fwatch.nvim") -- Used to check dark/light theme
|
||||
use("EdenEast/nightfox.nvim")
|
||||
use("nvim-lualine/lualine.nvim")
|
||||
|
||||
-- Layout Plugins
|
||||
use "dstein64/nvim-scrollview" -- ScrollBars
|
||||
use "akinsho/nvim-toggleterm.lua"
|
||||
use { "folke/zen-mode.nvim", config = function() require("zen-mode").setup {} end }
|
||||
use "rcarriga/nvim-notify"
|
||||
use "kyazdani42/nvim-web-devicons"
|
||||
use "kyazdani42/nvim-tree.lua"
|
||||
use "nvim-lua/popup.nvim"
|
||||
use 'goolord/alpha-nvim'
|
||||
use { "terrortylor/nvim-comment", config = function() require('nvim_comment').setup() end }
|
||||
use { "windwp/nvim-autopairs", config = function() require('nvim-autopairs').setup() end }
|
||||
use "gfeiyou/command-center.nvim"
|
||||
-- Layout Plugins
|
||||
use("dstein64/nvim-scrollview") -- ScrollBars
|
||||
use("akinsho/nvim-toggleterm.lua")
|
||||
use({
|
||||
"folke/zen-mode.nvim",
|
||||
config = function()
|
||||
require("zen-mode").setup({})
|
||||
end,
|
||||
})
|
||||
use("rcarriga/nvim-notify")
|
||||
use("kyazdani42/nvim-web-devicons")
|
||||
use("kyazdani42/nvim-tree.lua")
|
||||
use("nvim-lua/popup.nvim")
|
||||
use("goolord/alpha-nvim")
|
||||
use({
|
||||
"terrortylor/nvim-comment",
|
||||
config = function()
|
||||
require("nvim_comment").setup()
|
||||
end,
|
||||
})
|
||||
use({
|
||||
"windwp/nvim-autopairs",
|
||||
config = function()
|
||||
require("nvim-autopairs").setup()
|
||||
end,
|
||||
})
|
||||
use("gfeiyou/command-center.nvim")
|
||||
|
||||
-- Code Navigation
|
||||
use "junegunn/fzf"
|
||||
use "nvim-telescope/telescope.nvim"
|
||||
-- Code Navigation
|
||||
use("junegunn/fzf")
|
||||
use("nvim-telescope/telescope.nvim")
|
||||
|
||||
-- Lsp Errors
|
||||
use "folke/lsp-colors.nvim"
|
||||
use "kosayoda/nvim-lightbulb"
|
||||
use {
|
||||
"folke/trouble.nvim",
|
||||
requires = "kyazdani42/nvim-web-devicons",
|
||||
config = function()
|
||||
require("trouble").setup {}
|
||||
end
|
||||
}
|
||||
-- Lsp Errors
|
||||
use("folke/lsp-colors.nvim")
|
||||
use("kosayoda/nvim-lightbulb")
|
||||
use({
|
||||
"folke/trouble.nvim",
|
||||
requires = "kyazdani42/nvim-web-devicons",
|
||||
config = function()
|
||||
require("trouble").setup({})
|
||||
end,
|
||||
})
|
||||
use({
|
||||
"https://git.sr.ht/~whynothugo/lsp_lines.nvim",
|
||||
config = function()
|
||||
require("lsp_lines").setup()
|
||||
end,
|
||||
})
|
||||
|
||||
-- Syntax / Autocomplete
|
||||
use "tpope/vim-surround"
|
||||
use "neovim/nvim-lspconfig"
|
||||
use "hrsh7th/nvim-cmp"
|
||||
use "onsails/lspkind.nvim"
|
||||
use { 'tzachar/cmp-tabnine', run = './install.sh', requires = 'hrsh7th/nvim-cmp' }
|
||||
use "hrsh7th/cmp-nvim-lsp"
|
||||
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-treesitter/nvim-treesitter", run = ":TSUpdate" }
|
||||
-- Syntax / Autocomplete
|
||||
use("tpope/vim-surround")
|
||||
use("neovim/nvim-lspconfig")
|
||||
use("hrsh7th/nvim-cmp")
|
||||
use("onsails/lspkind.nvim")
|
||||
use({ "tzachar/cmp-tabnine", run = "./install.sh", requires = "hrsh7th/nvim-cmp" })
|
||||
-- use({ "hrsh7th/cmp-copilot", requires = "github/copilot.vim" })
|
||||
use("hrsh7th/cmp-nvim-lsp")
|
||||
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")
|
||||
|
||||
-- More IDE like features
|
||||
use {
|
||||
'rmagatti/session-lens',
|
||||
requires = { 'rmagatti/auto-session', 'nvim-telescope/telescope.nvim' },
|
||||
config = function()
|
||||
require('session-lens').setup({ path_display = { 'shorten' } })
|
||||
end
|
||||
}
|
||||
use({ "williamboman/mason.nvim" })
|
||||
use({ "williamboman/mason-lspconfig.nvim" })
|
||||
use({ "jose-elias-alvarez/null-ls.nvim" })
|
||||
use({ "nvim-treesitter/nvim-treesitter", run = ":TSUpdate" })
|
||||
|
||||
use {
|
||||
"nvim-neotest/neotest",
|
||||
requires = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
"antoinemadec/FixCursorHold.nvim"
|
||||
}
|
||||
}
|
||||
-- Dap Debugger
|
||||
use({ "mfussenegger/nvim-dap" })
|
||||
use({ "rcarriga/nvim-dap-ui" })
|
||||
|
||||
-- Database Feature
|
||||
use "tpope/vim-dadbod"
|
||||
use "kristijanhusak/vim-dadbod-ui"
|
||||
-- More IDE like features
|
||||
use({
|
||||
"rmagatti/session-lens",
|
||||
requires = { "rmagatti/auto-session", "nvim-telescope/telescope.nvim" },
|
||||
config = function()
|
||||
require("session-lens").setup({ path_display = { "shorten" } })
|
||||
end,
|
||||
})
|
||||
|
||||
if packer_bootstrap then
|
||||
packer.sync()
|
||||
end
|
||||
use({
|
||||
"edluffy/hologram.nvim",
|
||||
config = function() end,
|
||||
})
|
||||
|
||||
use({
|
||||
"nvim-neotest/neotest",
|
||||
requires = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
"antoinemadec/FixCursorHold.nvim",
|
||||
},
|
||||
})
|
||||
|
||||
-- Database Feature
|
||||
use("tpope/vim-dadbod")
|
||||
use("kristijanhusak/vim-dadbod-ui")
|
||||
|
||||
if packer_bootstrap then
|
||||
packer.sync()
|
||||
end
|
||||
end)
|
||||
|
10
configs/wezterm/wezterm.lua
Normal file
10
configs/wezterm/wezterm.lua
Normal file
@ -0,0 +1,10 @@
|
||||
local wezterm = require("wezterm")
|
||||
|
||||
return {
|
||||
font = wezterm.font("FiraCodeNerdFont"),
|
||||
font_size = 13,
|
||||
-- You can specify some parameters to influence the font selection;
|
||||
-- for example, this selects a Bold, Italic font variant.
|
||||
use_fancy_tab_bar = false,
|
||||
hide_tab_bar_if_only_one_tab = true,
|
||||
}
|
Loading…
Reference in New Issue
Block a user