mirror of
https://github.com/cole-maxwell1/dotfiles.git
synced 2026-06-03 11:10:20 -04:00
Compare commits
9 Commits
4eca393aa9
..
main
| Author | SHA1 | Date | |
|---|---|---|---|
| dd91da6b00 | |||
| f18f750962 | |||
| 32832a8260 | |||
| 3d16375b54 | |||
| 92e6109ab6 | |||
| 0c59342399 | |||
| b8c25c7bc1 | |||
| 63568c466a | |||
| f151eae7e7 |
@@ -1,13 +0,0 @@
|
|||||||
{
|
|
||||||
"runtime.version": "LuaJIT",
|
|
||||||
"runtime.path": [
|
|
||||||
"lua/?.lua",
|
|
||||||
"lua/?/init.lua"
|
|
||||||
],
|
|
||||||
"diagnostics.globals": ["vim"],
|
|
||||||
"workspace.checkThirdParty": false,
|
|
||||||
"workspace.library": [
|
|
||||||
"$VIMRUNTIME",
|
|
||||||
"./lua"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
local lsp_zero = require('lsp-zero')
|
|
||||||
|
|
||||||
|
|
||||||
lsp_zero.on_attach(function(client, bufnr)
|
|
||||||
-- see :help lsp-zero-keybindings
|
|
||||||
-- to learn the available actions
|
|
||||||
lsp_zero.default_keymaps({buffer = bufnr})
|
|
||||||
end)
|
|
||||||
|
|
||||||
lsp_zero.set_sign_icons({
|
|
||||||
error = '✘',
|
|
||||||
warn = '▲',
|
|
||||||
hint = '⚑',
|
|
||||||
info = '»'
|
|
||||||
})
|
|
||||||
|
|
||||||
-- to learn how to use mason.nvim
|
|
||||||
-- read this: https://github.com/VonHeikemen/lsp-zero.nvim/blob/v3.x/doc/md/guide/integrate-with-mason-nvim.md
|
|
||||||
require('mason').setup({})
|
|
||||||
require('mason-lspconfig').setup({
|
|
||||||
ensure_installed = {
|
|
||||||
'lua_ls',
|
|
||||||
'tsserver',
|
|
||||||
'eslint',
|
|
||||||
'gopls',
|
|
||||||
'rust_analyzer',
|
|
||||||
|
|
||||||
},
|
|
||||||
handlers = {
|
|
||||||
function(server_name)
|
|
||||||
require('lspconfig')[server_name].setup({})
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
local cmp = require('cmp')
|
|
||||||
|
|
||||||
cmp.setup({
|
|
||||||
mapping = cmp.mapping.preset.insert({
|
|
||||||
['<CR>'] = cmp.mapping.confirm({select = false}),
|
|
||||||
}),
|
|
||||||
preselect = 'item',
|
|
||||||
completion = {
|
|
||||||
completeopt = 'menu,menuone,noinsert'
|
|
||||||
},
|
|
||||||
})
|
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
-- Configure nvim-treesitter with defaults
|
||||||
|
require("nvim-treesitter").setup()
|
||||||
|
|
||||||
|
-- Register the custom x12 parser for the nvim-treesitter main branch API
|
||||||
|
vim.api.nvim_create_autocmd("User", {
|
||||||
|
pattern = "TSUpdate",
|
||||||
|
callback = function()
|
||||||
|
require("nvim-treesitter.parsers").x12 = {
|
||||||
|
install_info = {
|
||||||
|
url = "https://github.com/hugginsio/tree-sitter-x12",
|
||||||
|
files = {"src/parser.c"},
|
||||||
|
branch = "main",
|
||||||
|
generate_requires_npm = false,
|
||||||
|
requires_generate_from_grammar = false
|
||||||
|
},
|
||||||
|
filetype = "x12"
|
||||||
|
}
|
||||||
|
end
|
||||||
|
})
|
||||||
|
|
||||||
|
-- Explicitly trigger installation for the required parsers
|
||||||
|
require("nvim-treesitter").install({"bash", "c", "c_sharp", "diff", "go", "html", "javascript", "jsdoc", "json", "lua",
|
||||||
|
"luadoc", "luap", "markdown", "markdown_inline", "python", "query", "regex", "toml",
|
||||||
|
"tsx", "typescript", "vim", "vimdoc", "xml", "yaml", "x12"})
|
||||||
|
|
||||||
|
-- Automatically enable treesitter features for all buffers
|
||||||
|
local ts_group = vim.api.nvim_create_augroup("TreesitterStart", {
|
||||||
|
clear = true
|
||||||
|
})
|
||||||
|
vim.api.nvim_create_autocmd("FileType", {
|
||||||
|
group = ts_group,
|
||||||
|
callback = function(args)
|
||||||
|
-- Bypass treesitter if the file exceeds 200 MiB
|
||||||
|
local max_filesize = 200 * 1024 * 1024
|
||||||
|
local filepath = vim.api.nvim_buf_get_name(args.buf)
|
||||||
|
local ok, stats = pcall(vim.uv.fs_stat, filepath)
|
||||||
|
|
||||||
|
if ok and stats and stats.size > max_filesize then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Start treesitter highlighting
|
||||||
|
-- Using pcall prevents errors if a parser is missing for the current filetype
|
||||||
|
pcall(vim.treesitter.start, args.buf)
|
||||||
|
end
|
||||||
|
})
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
require'nvim-treesitter.configs'.setup {
|
|
||||||
-- A list of parser names, or "all" (the five listed parsers should always be installed)
|
|
||||||
ensure_installed = { "javascript", "typescript", "go", "rust", "c", "lua", "vim", "vimdoc", "query" },
|
|
||||||
|
|
||||||
-- Install parsers synchronously (only applied to `ensure_installed`)
|
|
||||||
sync_install = false,
|
|
||||||
|
|
||||||
-- Automatically install missing parsers when entering buffer
|
|
||||||
-- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally
|
|
||||||
auto_install = true,
|
|
||||||
|
|
||||||
-- List of parsers to ignore installing (or "all")
|
|
||||||
-- ignore_install = { "javascript" },
|
|
||||||
|
|
||||||
---- If you need to change the installation directory of the parsers (see -> Advanced Setup)
|
|
||||||
-- parser_install_dir = "/some/path/to/store/parsers", -- Remember to run vim.opt.runtimepath:append("/some/path/to/store/parsers")!
|
|
||||||
|
|
||||||
highlight = {
|
|
||||||
enable = true,
|
|
||||||
|
|
||||||
-- Setting this to true will run `:h syntax` and tree-sitter at the same time.
|
|
||||||
-- Set this to `true` if you depend on 'syntax' being enabled (like for indentation).
|
|
||||||
-- Using this option may slow down your editor, and you may see some duplicate highlights.
|
|
||||||
-- Instead of true it can also be a list of languages
|
|
||||||
additional_vim_regex_highlighting = false,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
local cmp = require("cmp")
|
||||||
|
local luasnip = require("luasnip")
|
||||||
|
|
||||||
|
cmp.setup({
|
||||||
|
snippet = {
|
||||||
|
expand = function(args)
|
||||||
|
luasnip.lsp_expand(args.body)
|
||||||
|
end
|
||||||
|
},
|
||||||
|
|
||||||
|
mapping = cmp.mapping.preset.insert({
|
||||||
|
["<C-b>"] = cmp.mapping.scroll_docs(-4),
|
||||||
|
["<C-f>"] = cmp.mapping.scroll_docs(4),
|
||||||
|
["<C-p>"] = cmp.mapping.select_prev_item(),
|
||||||
|
["<C-n>"] = cmp.mapping.select_next_item(),
|
||||||
|
["<C-Space>"] = cmp.mapping.complete(),
|
||||||
|
["<C-e>"] = cmp.mapping.abort(),
|
||||||
|
|
||||||
|
["<CR>"] = cmp.mapping.confirm({
|
||||||
|
select = false
|
||||||
|
})
|
||||||
|
}),
|
||||||
|
|
||||||
|
preselect = cmp.PreselectMode.None,
|
||||||
|
|
||||||
|
completion = {
|
||||||
|
completeopt = "menu,menuone,noinsert,noselect"
|
||||||
|
},
|
||||||
|
|
||||||
|
window = {
|
||||||
|
completion = cmp.config.window.bordered(),
|
||||||
|
documentation = cmp.config.window.bordered()
|
||||||
|
},
|
||||||
|
|
||||||
|
sources = cmp.config.sources({{
|
||||||
|
name = "nvim_lsp"
|
||||||
|
}, {
|
||||||
|
name = "luasnip"
|
||||||
|
}, {
|
||||||
|
name = "path"
|
||||||
|
}}, {{
|
||||||
|
name = "buffer"
|
||||||
|
}})
|
||||||
|
})
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
-- Register custom filetypes for EDI documents
|
||||||
|
vim.filetype.add({
|
||||||
|
extension = {
|
||||||
|
edi = "x12",
|
||||||
|
dat = "x12"
|
||||||
|
}
|
||||||
|
})
|
||||||
@@ -1,4 +1,6 @@
|
|||||||
require("cole.remap")
|
require("cole.remap")
|
||||||
|
require("cole.plugins")
|
||||||
|
require("cole.filetype")
|
||||||
require("cole.set")
|
require("cole.set")
|
||||||
require("cole.packer")
|
require("cole.cmp")
|
||||||
|
require("cole.lsp")
|
||||||
@@ -0,0 +1,137 @@
|
|||||||
|
require("mason").setup()
|
||||||
|
|
||||||
|
require("mason-tool-installer").setup({
|
||||||
|
ensure_installed = {"lua_ls", "gopls", "ts_ls", "eslint", "rust_analyzer", "jsonls", "bashls", "stylua", "prettier",
|
||||||
|
"goimports", "shfmt"}
|
||||||
|
})
|
||||||
|
|
||||||
|
local capabilities = require("cmp_nvim_lsp").default_capabilities()
|
||||||
|
|
||||||
|
vim.lsp.config("*", {
|
||||||
|
capabilities = capabilities
|
||||||
|
})
|
||||||
|
|
||||||
|
vim.lsp.config("lua_ls", {
|
||||||
|
settings = {
|
||||||
|
Lua = {
|
||||||
|
runtime = {
|
||||||
|
version = "LuaJIT"
|
||||||
|
},
|
||||||
|
diagnostics = {
|
||||||
|
globals = {"vim"}
|
||||||
|
},
|
||||||
|
workspace = {
|
||||||
|
checkThirdParty = false,
|
||||||
|
library = {vim.env.VIMRUNTIME, "${3rd}/luv/library"}
|
||||||
|
},
|
||||||
|
telemetry = {
|
||||||
|
enable = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
vim.lsp.config("gopls", {
|
||||||
|
settings = {
|
||||||
|
gopls = {
|
||||||
|
staticcheck = true,
|
||||||
|
gofumpt = true,
|
||||||
|
usePlaceholders = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
vim.lsp.config("ts_ls", {
|
||||||
|
settings = {
|
||||||
|
typescript = {
|
||||||
|
inlayHints = {
|
||||||
|
includeInlayParameterNameHints = "all",
|
||||||
|
includeInlayFunctionParameterTypeHints = true,
|
||||||
|
includeInlayVariableTypeHints = true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
javascript = {
|
||||||
|
inlayHints = {
|
||||||
|
includeInlayParameterNameHints = "all",
|
||||||
|
includeInlayFunctionParameterTypeHints = true,
|
||||||
|
includeInlayVariableTypeHints = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
vim.lsp.config("rust_analyzer", {
|
||||||
|
settings = {
|
||||||
|
["rust-analyzer"] = {
|
||||||
|
cargo = {
|
||||||
|
allFeatures = true
|
||||||
|
},
|
||||||
|
check = {
|
||||||
|
command = "clippy"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
require("mason-lspconfig").setup({
|
||||||
|
automatic_enable = {
|
||||||
|
exclude = {"ts_ls"}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
vim.lsp.enable("ts_ls")
|
||||||
|
|
||||||
|
vim.diagnostic.config({
|
||||||
|
severity_sort = true,
|
||||||
|
update_in_insert = false,
|
||||||
|
|
||||||
|
float = {
|
||||||
|
border = "rounded",
|
||||||
|
source = "if_many"
|
||||||
|
},
|
||||||
|
|
||||||
|
underline = true,
|
||||||
|
|
||||||
|
virtual_text = {
|
||||||
|
spacing = 2,
|
||||||
|
source = "if_many",
|
||||||
|
prefix = "●"
|
||||||
|
},
|
||||||
|
|
||||||
|
signs = {
|
||||||
|
text = {
|
||||||
|
[vim.diagnostic.severity.ERROR] = "E",
|
||||||
|
[vim.diagnostic.severity.WARN] = "W",
|
||||||
|
[vim.diagnostic.severity.INFO] = "I",
|
||||||
|
[vim.diagnostic.severity.HINT] = "H"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
vim.api.nvim_create_autocmd("LspAttach", {
|
||||||
|
callback = function(args)
|
||||||
|
local bufnr = args.buf
|
||||||
|
|
||||||
|
local map = function(mode, lhs, rhs, desc)
|
||||||
|
vim.keymap.set(mode, lhs, rhs, {
|
||||||
|
buffer = bufnr,
|
||||||
|
silent = true,
|
||||||
|
desc = desc
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
map("n", "K", vim.lsp.buf.hover, "LSP hover")
|
||||||
|
map("n", "gd", vim.lsp.buf.definition, "Go to definition")
|
||||||
|
map("n", "gD", vim.lsp.buf.declaration, "Go to declaration")
|
||||||
|
map("n", "gi", vim.lsp.buf.implementation, "Go to implementation")
|
||||||
|
map("n", "gr", vim.lsp.buf.references, "References")
|
||||||
|
map("n", "<leader>rn", vim.lsp.buf.rename, "Rename symbol")
|
||||||
|
map({"n", "v"}, "<leader>ca", vim.lsp.buf.code_action, "Code action")
|
||||||
|
|
||||||
|
map("n", "<leader>f", function()
|
||||||
|
vim.lsp.buf.format({
|
||||||
|
async = true
|
||||||
|
})
|
||||||
|
end, "Format buffer")
|
||||||
|
end
|
||||||
|
})
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
-- This file can be loaded by calling `lua require('plugins')` from your init.vim
|
|
||||||
-- Only required if you have packer configured as `opt`
|
|
||||||
vim.cmd [[packadd packer.nvim]]
|
|
||||||
|
|
||||||
return require('packer').startup(function(use)
|
|
||||||
-- Packer can manage itself
|
|
||||||
use 'wbthomason/packer.nvim'
|
|
||||||
|
|
||||||
-- Fuzzy finder
|
|
||||||
use {
|
|
||||||
'nvim-telescope/telescope.nvim',
|
|
||||||
tag = '0.1.5',
|
|
||||||
-- or, branch = '0.1.x',
|
|
||||||
requires = {{'nvim-lua/plenary.nvim'}}
|
|
||||||
}
|
|
||||||
|
|
||||||
-- syntax highlighting
|
|
||||||
use {
|
|
||||||
'nvim-treesitter/nvim-treesitter',
|
|
||||||
run = ':TSUpdate'
|
|
||||||
}
|
|
||||||
|
|
||||||
-- LSP support
|
|
||||||
use {
|
|
||||||
'VonHeikemen/lsp-zero.nvim',
|
|
||||||
branch = 'v3.x',
|
|
||||||
requires = {{'williamboman/mason.nvim'}, {'williamboman/mason-lspconfig.nvim'}, {'neovim/nvim-lspconfig'},
|
|
||||||
{'hrsh7th/nvim-cmp'}, {'hrsh7th/cmp-nvim-lsp'}, {'L3MON4D3/LuaSnip'}}
|
|
||||||
}
|
|
||||||
|
|
||||||
use {"williamboman/mason.nvim", "williamboman/mason-lspconfig.nvim"}
|
|
||||||
|
|
||||||
end)
|
|
||||||
|
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
-- Define plugins for Neovim 0.12 native package manager.
|
||||||
|
vim.pack.add({
|
||||||
|
--Theme
|
||||||
|
"https://github.com/bluz71/vim-moonfly-colors",
|
||||||
|
--File switch
|
||||||
|
{ src = "https://github.com/nvim-telescope/telescope.nvim", version = "0.1.5" },
|
||||||
|
--Syntax
|
||||||
|
"https://github.com/nvim-treesitter/nvim-treesitter",
|
||||||
|
--LSP
|
||||||
|
"https://github.com/mason-org/mason.nvim",
|
||||||
|
"https://github.com/mason-org/mason-lspconfig.nvim",
|
||||||
|
"https://github.com/WhoIsSethDaniel/mason-tool-installer.nvim",
|
||||||
|
"https://github.com/neovim/nvim-lspconfig",
|
||||||
|
--Auto complete
|
||||||
|
"https://github.com/hrsh7th/nvim-cmp",
|
||||||
|
"https://github.com/hrsh7th/cmp-nvim-lsp",
|
||||||
|
"https://github.com/hrsh7th/cmp-buffer",
|
||||||
|
"https://github.com/hrsh7th/cmp-path",
|
||||||
|
"https://github.com/saadparwaiz1/cmp_luasnip",
|
||||||
|
"https://github.com/L3MON4D3/LuaSnip",
|
||||||
|
})
|
||||||
@@ -17,5 +17,69 @@ vim.opt.incsearch = true
|
|||||||
vim.opt.scrolloff = 8 -- Always 8 lines above
|
vim.opt.scrolloff = 8 -- Always 8 lines above
|
||||||
|
|
||||||
-- Color scheme
|
-- Color scheme
|
||||||
vim.cmd.colorscheme("habamax")
|
vim.cmd.colorscheme("moonfly")
|
||||||
|
|
||||||
|
-- Diff: Muted Red on Crimson
|
||||||
|
vim.api.nvim_set_hl(0, "DiffAdd", {
|
||||||
|
bg = "#1e3a1e",
|
||||||
|
fg = "NONE"
|
||||||
|
}) -- added lines: muted green
|
||||||
|
vim.api.nvim_set_hl(0, "DiffDelete", {
|
||||||
|
bg = "#3d1a1a",
|
||||||
|
fg = "#6b3a3a"
|
||||||
|
}) -- deleted lines: muted red
|
||||||
|
vim.api.nvim_set_hl(0, "DiffChange", {
|
||||||
|
bg = "#3a1c1c",
|
||||||
|
fg = "NONE"
|
||||||
|
}) -- changed lines: light red wash
|
||||||
|
vim.api.nvim_set_hl(0, "DiffText", {
|
||||||
|
bg = "#8b2035",
|
||||||
|
fg = "NONE",
|
||||||
|
bold = true
|
||||||
|
}) -- char diff: saturated red (crimson)
|
||||||
|
|
||||||
|
-- Dynamic diff window width sizing
|
||||||
|
vim.api.nvim_create_autocmd("VimEnter", {
|
||||||
|
callback = function()
|
||||||
|
if not vim.wo.diff then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Defer execution to unblock the initial UI render
|
||||||
|
vim.schedule(function()
|
||||||
|
-- Limit the line check to the first 2000 lines to prevent long startup times on large files
|
||||||
|
local max_lines_to_check = 2000
|
||||||
|
local line_count = vim.api.nvim_buf_line_count(0)
|
||||||
|
local limit = math.min(line_count, max_lines_to_check)
|
||||||
|
local lines = vim.api.nvim_buf_get_lines(0, 0, limit, false)
|
||||||
|
local max_len = 0
|
||||||
|
|
||||||
|
for _, line in ipairs(lines) do
|
||||||
|
local len = vim.api.nvim_strwidth(line)
|
||||||
|
if len > max_len then
|
||||||
|
max_len = len
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Account for gutter columns (line numbers, sign column, fold column).
|
||||||
|
local gutter = 0
|
||||||
|
if vim.wo.number or vim.wo.relativenumber then
|
||||||
|
gutter = gutter + vim.wo.numberwidth
|
||||||
|
end
|
||||||
|
if vim.wo.signcolumn ~= "no" then
|
||||||
|
gutter = gutter + 2
|
||||||
|
end
|
||||||
|
|
||||||
|
local fold_col = tonumber(vim.wo.foldcolumn) or 0
|
||||||
|
gutter = gutter + fold_col
|
||||||
|
|
||||||
|
local desired = max_len + gutter + 1 -- +1 for the right edge padding
|
||||||
|
|
||||||
|
-- Cap at exactly half the terminal width.
|
||||||
|
local half = math.floor(vim.o.columns / 2)
|
||||||
|
local width = math.min(desired, half)
|
||||||
|
|
||||||
|
vim.api.nvim_win_set_width(0, width)
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
})
|
||||||
|
|||||||
@@ -0,0 +1,57 @@
|
|||||||
|
{
|
||||||
|
"plugins": {
|
||||||
|
"LuaSnip": {
|
||||||
|
"rev": "a62e1083a3cfe8b6b206e7d3d33a51091df25357",
|
||||||
|
"src": "https://github.com/L3MON4D3/LuaSnip"
|
||||||
|
},
|
||||||
|
"cmp-buffer": {
|
||||||
|
"rev": "b74fab3656eea9de20a9b8116afa3cfc4ec09657",
|
||||||
|
"src": "https://github.com/hrsh7th/cmp-buffer"
|
||||||
|
},
|
||||||
|
"cmp-nvim-lsp": {
|
||||||
|
"rev": "cbc7b02bb99fae35cb42f514762b89b5126651ef",
|
||||||
|
"src": "https://github.com/hrsh7th/cmp-nvim-lsp"
|
||||||
|
},
|
||||||
|
"cmp-path": {
|
||||||
|
"rev": "c642487086dbd9a93160e1679a1327be111cbc25",
|
||||||
|
"src": "https://github.com/hrsh7th/cmp-path"
|
||||||
|
},
|
||||||
|
"cmp_luasnip": {
|
||||||
|
"rev": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90",
|
||||||
|
"src": "https://github.com/saadparwaiz1/cmp_luasnip"
|
||||||
|
},
|
||||||
|
"mason-lspconfig.nvim": {
|
||||||
|
"rev": "0c2823e0418f3d9230ff8b201c976e84de1cb401",
|
||||||
|
"src": "https://github.com/mason-org/mason-lspconfig.nvim"
|
||||||
|
},
|
||||||
|
"mason-tool-installer.nvim": {
|
||||||
|
"rev": "443f1ef8b5e6bf47045cb2217b6f748a223cf7dc",
|
||||||
|
"src": "https://github.com/WhoIsSethDaniel/mason-tool-installer.nvim"
|
||||||
|
},
|
||||||
|
"mason.nvim": {
|
||||||
|
"rev": "12ddd182d9efbdc848b540f16484a583d52da0fb",
|
||||||
|
"src": "https://github.com/mason-org/mason.nvim"
|
||||||
|
},
|
||||||
|
"nvim-cmp": {
|
||||||
|
"rev": "a1d504892f2bc56c2e79b65c6faded2fd21f3eca",
|
||||||
|
"src": "https://github.com/hrsh7th/nvim-cmp"
|
||||||
|
},
|
||||||
|
"nvim-lspconfig": {
|
||||||
|
"rev": "8fde495949782bb61c2605174e231d145a048d8c",
|
||||||
|
"src": "https://github.com/neovim/nvim-lspconfig"
|
||||||
|
},
|
||||||
|
"nvim-treesitter": {
|
||||||
|
"rev": "4916d6592ede8c07973490d9322f187e07dfefac",
|
||||||
|
"src": "https://github.com/nvim-treesitter/nvim-treesitter"
|
||||||
|
},
|
||||||
|
"telescope.nvim": {
|
||||||
|
"rev": "d90956833d7c27e73c621a61f20b29fdb7122709",
|
||||||
|
"src": "https://github.com/nvim-telescope/telescope.nvim",
|
||||||
|
"version": "'0.1.5'"
|
||||||
|
},
|
||||||
|
"vim-moonfly-colors": {
|
||||||
|
"rev": "ed33cb0e0edfced6e86e782d51f23e67232ad4a9",
|
||||||
|
"src": "https://github.com/bluz71/vim-moonfly-colors"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,149 +0,0 @@
|
|||||||
-- Automatically generated packer.nvim plugin loader code
|
|
||||||
|
|
||||||
if vim.api.nvim_call_function('has', {'nvim-0.5'}) ~= 1 then
|
|
||||||
vim.api.nvim_command('echohl WarningMsg | echom "Invalid Neovim version for packer.nvim! | echohl None"')
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
vim.api.nvim_command('packadd packer.nvim')
|
|
||||||
|
|
||||||
local no_errors, error_msg = pcall(function()
|
|
||||||
|
|
||||||
_G._packer = _G._packer or {}
|
|
||||||
_G._packer.inside_compile = true
|
|
||||||
|
|
||||||
local time
|
|
||||||
local profile_info
|
|
||||||
local should_profile = false
|
|
||||||
if should_profile then
|
|
||||||
local hrtime = vim.loop.hrtime
|
|
||||||
profile_info = {}
|
|
||||||
time = function(chunk, start)
|
|
||||||
if start then
|
|
||||||
profile_info[chunk] = hrtime()
|
|
||||||
else
|
|
||||||
profile_info[chunk] = (hrtime() - profile_info[chunk]) / 1e6
|
|
||||||
end
|
|
||||||
end
|
|
||||||
else
|
|
||||||
time = function(chunk, start) end
|
|
||||||
end
|
|
||||||
|
|
||||||
local function save_profiles(threshold)
|
|
||||||
local sorted_times = {}
|
|
||||||
for chunk_name, time_taken in pairs(profile_info) do
|
|
||||||
sorted_times[#sorted_times + 1] = {chunk_name, time_taken}
|
|
||||||
end
|
|
||||||
table.sort(sorted_times, function(a, b) return a[2] > b[2] end)
|
|
||||||
local results = {}
|
|
||||||
for i, elem in ipairs(sorted_times) do
|
|
||||||
if not threshold or threshold and elem[2] > threshold then
|
|
||||||
results[i] = elem[1] .. ' took ' .. elem[2] .. 'ms'
|
|
||||||
end
|
|
||||||
end
|
|
||||||
if threshold then
|
|
||||||
table.insert(results, '(Only showing plugins that took longer than ' .. threshold .. ' ms ' .. 'to load)')
|
|
||||||
end
|
|
||||||
|
|
||||||
_G._packer.profile_output = results
|
|
||||||
end
|
|
||||||
|
|
||||||
time([[Luarocks path setup]], true)
|
|
||||||
local package_path_str = "/Users/cole/.cache/nvim/packer_hererocks/2.1.1713773202/share/lua/5.1/?.lua;/Users/cole/.cache/nvim/packer_hererocks/2.1.1713773202/share/lua/5.1/?/init.lua;/Users/cole/.cache/nvim/packer_hererocks/2.1.1713773202/lib/luarocks/rocks-5.1/?.lua;/Users/cole/.cache/nvim/packer_hererocks/2.1.1713773202/lib/luarocks/rocks-5.1/?/init.lua"
|
|
||||||
local install_cpath_pattern = "/Users/cole/.cache/nvim/packer_hererocks/2.1.1713773202/lib/lua/5.1/?.so"
|
|
||||||
if not string.find(package.path, package_path_str, 1, true) then
|
|
||||||
package.path = package.path .. ';' .. package_path_str
|
|
||||||
end
|
|
||||||
|
|
||||||
if not string.find(package.cpath, install_cpath_pattern, 1, true) then
|
|
||||||
package.cpath = package.cpath .. ';' .. install_cpath_pattern
|
|
||||||
end
|
|
||||||
|
|
||||||
time([[Luarocks path setup]], false)
|
|
||||||
time([[try_loadstring definition]], true)
|
|
||||||
local function try_loadstring(s, component, name)
|
|
||||||
local success, result = pcall(loadstring(s), name, _G.packer_plugins[name])
|
|
||||||
if not success then
|
|
||||||
vim.schedule(function()
|
|
||||||
vim.api.nvim_notify('packer.nvim: Error running ' .. component .. ' for ' .. name .. ': ' .. result, vim.log.levels.ERROR, {})
|
|
||||||
end)
|
|
||||||
end
|
|
||||||
return result
|
|
||||||
end
|
|
||||||
|
|
||||||
time([[try_loadstring definition]], false)
|
|
||||||
time([[Defining packer_plugins]], true)
|
|
||||||
_G.packer_plugins = {
|
|
||||||
LuaSnip = {
|
|
||||||
loaded = true,
|
|
||||||
path = "/Users/cole/.local/share/nvim/site/pack/packer/start/LuaSnip",
|
|
||||||
url = "https://github.com/L3MON4D3/LuaSnip"
|
|
||||||
},
|
|
||||||
["cmp-nvim-lsp"] = {
|
|
||||||
loaded = true,
|
|
||||||
path = "/Users/cole/.local/share/nvim/site/pack/packer/start/cmp-nvim-lsp",
|
|
||||||
url = "https://github.com/hrsh7th/cmp-nvim-lsp"
|
|
||||||
},
|
|
||||||
["lsp-zero.nvim"] = {
|
|
||||||
loaded = true,
|
|
||||||
path = "/Users/cole/.local/share/nvim/site/pack/packer/start/lsp-zero.nvim",
|
|
||||||
url = "https://github.com/VonHeikemen/lsp-zero.nvim"
|
|
||||||
},
|
|
||||||
["mason-lspconfig.nvim"] = {
|
|
||||||
loaded = true,
|
|
||||||
path = "/Users/cole/.local/share/nvim/site/pack/packer/start/mason-lspconfig.nvim",
|
|
||||||
url = "https://github.com/williamboman/mason-lspconfig.nvim"
|
|
||||||
},
|
|
||||||
["mason.nvim"] = {
|
|
||||||
loaded = true,
|
|
||||||
path = "/Users/cole/.local/share/nvim/site/pack/packer/start/mason.nvim",
|
|
||||||
url = "https://github.com/williamboman/mason.nvim"
|
|
||||||
},
|
|
||||||
["nvim-cmp"] = {
|
|
||||||
loaded = true,
|
|
||||||
path = "/Users/cole/.local/share/nvim/site/pack/packer/start/nvim-cmp",
|
|
||||||
url = "https://github.com/hrsh7th/nvim-cmp"
|
|
||||||
},
|
|
||||||
["nvim-lspconfig"] = {
|
|
||||||
loaded = true,
|
|
||||||
path = "/Users/cole/.local/share/nvim/site/pack/packer/start/nvim-lspconfig",
|
|
||||||
url = "https://github.com/neovim/nvim-lspconfig"
|
|
||||||
},
|
|
||||||
["nvim-treesitter"] = {
|
|
||||||
loaded = true,
|
|
||||||
path = "/Users/cole/.local/share/nvim/site/pack/packer/start/nvim-treesitter",
|
|
||||||
url = "https://github.com/nvim-treesitter/nvim-treesitter"
|
|
||||||
},
|
|
||||||
["packer.nvim"] = {
|
|
||||||
loaded = true,
|
|
||||||
path = "/Users/cole/.local/share/nvim/site/pack/packer/start/packer.nvim",
|
|
||||||
url = "https://github.com/wbthomason/packer.nvim"
|
|
||||||
},
|
|
||||||
["plenary.nvim"] = {
|
|
||||||
loaded = true,
|
|
||||||
path = "/Users/cole/.local/share/nvim/site/pack/packer/start/plenary.nvim",
|
|
||||||
url = "https://github.com/nvim-lua/plenary.nvim"
|
|
||||||
},
|
|
||||||
["telescope.nvim"] = {
|
|
||||||
loaded = true,
|
|
||||||
path = "/Users/cole/.local/share/nvim/site/pack/packer/start/telescope.nvim",
|
|
||||||
url = "https://github.com/nvim-telescope/telescope.nvim"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
time([[Defining packer_plugins]], false)
|
|
||||||
|
|
||||||
_G._packer.inside_compile = false
|
|
||||||
if _G._packer.needs_bufread == true then
|
|
||||||
vim.cmd("doautocmd BufRead")
|
|
||||||
end
|
|
||||||
_G._packer.needs_bufread = false
|
|
||||||
|
|
||||||
if should_profile then save_profiles() end
|
|
||||||
|
|
||||||
end)
|
|
||||||
|
|
||||||
if not no_errors then
|
|
||||||
error_msg = error_msg:gsub('"', '\\"')
|
|
||||||
vim.api.nvim_command('echohl ErrorMsg | echom "Error in packer_compiled: '..error_msg..'" | echom "Please check your config for correctness" | echohl None')
|
|
||||||
end
|
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
(segment_header) @keyword
|
||||||
|
|
||||||
|
[
|
||||||
|
(element_separator)
|
||||||
|
(component_element_separator)
|
||||||
|
(segment_separator)
|
||||||
|
] @comment
|
||||||
|
|
||||||
|
(alphanumeric) @string
|
||||||
|
(numeric) @number
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
.DS_Store
|
||||||
@@ -57,6 +57,11 @@ if [[ -d $HOME/.cargo/bin && ":$PATH:" != *":$HOME/.cargo/bin:"* ]]; then
|
|||||||
export PATH=$PATH:$HOME/.cargo/bin
|
export PATH=$PATH:$HOME/.cargo/bin
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Add .dotnet/tools path if installed and not already in $PATH
|
||||||
|
if [[ -d $HOME/.dotnet/tools && ":$PATH:" != *":$HOME/.dotnet/tools:"* ]]; then
|
||||||
|
export PATH=$PATH:$HOME/.dotnet/tools
|
||||||
|
fi
|
||||||
|
|
||||||
###############################################
|
###############################################
|
||||||
# History configuration
|
# History configuration
|
||||||
###############################################
|
###############################################
|
||||||
|
|||||||
Reference in New Issue
Block a user