Compare commits
No commits in common. "0b0157c6426c7a393fa825faf558daf4c40596e3" and "b823d1614a65267432ec7b08c090152df2f5093d" have entirely different histories.
0b0157c642
...
b823d1614a
|
|
@ -2,33 +2,32 @@
|
|||
|
||||
## plugins used
|
||||
|
||||
- [telescope-fzf-native.nvim](https://github.com/nvim-telescope/telescope-fzf-native.nvim.git)
|
||||
- [luvit-meta](https://github.com/Bilal2453/luvit-meta.git)
|
||||
- [neo-tree.nvim](https://github.com/nvim-neo-tree/neo-tree.nvim.git)
|
||||
- [nvim-notify](https://github.com/rcarriga/nvim-notify.git)
|
||||
- [nvim-web-devicons](https://github.com/nvim-tree/nvim-web-devicons.git)
|
||||
- [lualine.nvim](https://github.com/nvim-lualine/lualine.nvim.git)
|
||||
- [telescope.nvim](https://github.com/nvim-telescope/telescope.nvim.git)
|
||||
- [nui.nvim](https://github.com/MunifTanjim/nui.nvim.git)
|
||||
- [mini.map](https://github.com/echasnovski/mini.map.git)
|
||||
- [plenary.nvim](https://github.com/nvim-lua/plenary.nvim.git)
|
||||
- [which-key.nvim](https://github.com/folke/which-key.nvim.git)
|
||||
- [lazy.nvim](https://github.com/folke/lazy.nvim.git)
|
||||
- [git-conflict.nvim](https://github.com/akinsho/git-conflict.nvim.git)
|
||||
- [friendly-snippets](https://github.com/rafamadriz/friendly-snippets.git)
|
||||
- [hurl.nvim](https://github.com/jellydn/hurl.nvim.git)
|
||||
- [outline.nvim](https://github.com/hedyhli/outline.nvim.git)
|
||||
- [vim-cool](https://github.com/romainl/vim-cool.git)
|
||||
- [trouble.nvim](https://github.com/folke/trouble.nvim.git)
|
||||
- [conform.nvim](https://github.com/stevearc/conform.nvim.git)
|
||||
- [Comment.nvim](https://github.com/numToStr/Comment.nvim.git)
|
||||
- [todo-comments.nvim](https://github.com/folke/todo-comments.nvim.git)
|
||||
- [nvim-ts-autotag](https://github.com/windwp/nvim-ts-autotag.git)
|
||||
- [nui.nvim](https://github.com/MunifTanjim/nui.nvim.git)
|
||||
- [git-conflict.nvim](https://github.com/akinsho/git-conflict.nvim.git)
|
||||
- [dressing.nvim](https://github.com/stevearc/dressing.nvim.git)
|
||||
- [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig.git)
|
||||
- [nvim-surround](https://github.com/kylechui/nvim-surround.git)
|
||||
- [nvim-treesitter](https://github.com/nvim-treesitter/nvim-treesitter.git)
|
||||
- [telescope.nvim](https://github.com/nvim-telescope/telescope.nvim.git)
|
||||
- [which-key.nvim](https://github.com/folke/which-key.nvim.git)
|
||||
- [fidget.nvim](https://github.com/j-hui/fidget.nvim.git)
|
||||
- [catppuccin](https://github.com/catppuccin/nvim.git)
|
||||
- [lualine.nvim](https://github.com/nvim-lualine/lualine.nvim.git)
|
||||
- [lazydev.nvim](https://github.com/folke/lazydev.nvim.git)
|
||||
- [plenary.nvim](https://github.com/nvim-lua/plenary.nvim.git)
|
||||
- [luvit-meta](https://github.com/Bilal2453/luvit-meta.git)
|
||||
- [mini.map](https://github.com/echasnovski/mini.map.git)
|
||||
- [nvim-ts-autotag](https://github.com/windwp/nvim-ts-autotag.git)
|
||||
- [lazy.nvim](https://github.com/folke/lazy.nvim.git)
|
||||
- [vim-cool](https://github.com/romainl/vim-cool.git)
|
||||
- [nvim-treesitter](https://github.com/nvim-treesitter/nvim-treesitter.git)
|
||||
- [conform.nvim](https://github.com/stevearc/conform.nvim.git)
|
||||
- [todo-comments.nvim](https://github.com/folke/todo-comments.nvim.git)
|
||||
- [catppuccin](https://github.com/catppuccin/nvim.git)
|
||||
- [Comment.nvim](https://github.com/numToStr/Comment.nvim.git)
|
||||
- [nvim-notify](https://github.com/rcarriga/nvim-notify.git)
|
||||
- [nvim-surround](https://github.com/kylechui/nvim-surround.git)
|
||||
- [blink.cmp](https://github.com/saghen/blink.cmp.git)
|
||||
- [trouble.nvim](https://github.com/folke/trouble.nvim.git)
|
||||
- [telescope-fzf-native.nvim](https://github.com/nvim-telescope/telescope-fzf-native.nvim.git)
|
||||
- [friendly-snippets](https://github.com/rafamadriz/friendly-snippets.git)
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
local port = os.getenv("GDScript_Port") or "6005"
|
||||
local cmd = vim.lsp.rpc.connect("127.0.0.1", port)
|
||||
local pipe = "/tmp/godot.pipe"
|
||||
|
||||
vim.lsp.start({
|
||||
name = "Godot",
|
||||
cmd = cmd,
|
||||
root_dir = vim.fs.dirname(vim.fs.find({ "project.godot", ".git" }, { upward = true })[1]),
|
||||
on_attach = function(client, bufnr)
|
||||
vim.api.nvim_command('echo serverstart("' .. pipe .. '")')
|
||||
end,
|
||||
})
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
{
|
||||
"Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" },
|
||||
"blink.cmp": { "branch": "main", "commit": "a9a0f96c6a1029884e37dfd74a88a075b40366dd" },
|
||||
"catppuccin": { "branch": "main", "commit": "faf15ab0201b564b6368ffa47b56feefc92ce3f4" },
|
||||
"conform.nvim": { "branch": "master", "commit": "339b3e4519ec49312d34fcfa275aa15bfaa67025" },
|
||||
"dressing.nvim": { "branch": "master", "commit": "3a45525bb182730fe462325c99395529308f431e" },
|
||||
"fidget.nvim": { "branch": "main", "commit": "9238947645ce17d96f30842e61ba81147185b657" },
|
||||
"friendly-snippets": { "branch": "main", "commit": "efff286dd74c22f731cdec26a70b46e5b203c619" },
|
||||
"git-conflict.nvim": { "branch": "main", "commit": "4bbfdd92d547d2862a75b4e80afaf30e73f7bbb4" },
|
||||
"hurl.nvim": { "branch": "main", "commit": "438360f62e73e8d149f0374d9d1d75c1441807e3" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "7e6c863bc7563efbdd757a310d17ebc95166cef3" },
|
||||
"lazydev.nvim": { "branch": "main", "commit": "8620f82ee3f59ff2187647167b6b47387a13a018" },
|
||||
"lualine.nvim": { "branch": "master", "commit": "2a5bae925481f999263d6f5ed8361baef8df4f83" },
|
||||
"luvit-meta": { "branch": "main", "commit": "57d464c4acb5c2e66bd4145060f5dc9e96a7bbb7" },
|
||||
"mini.map": { "branch": "main", "commit": "4c58e755d75f9999abcd3b3c6e934734b6a8b098" },
|
||||
"neo-tree.nvim": { "branch": "v3.x", "commit": "a77af2e764c5ed4038d27d1c463fa49cd4794e07" },
|
||||
"nui.nvim": { "branch": "main", "commit": "53e907ffe5eedebdca1cd503b00aa8692068ca46" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "f1405c1ea5d7a1051a8ced3110d7cf3b8524041b" },
|
||||
"nvim-notify": { "branch": "master", "commit": "fbef5d32be8466dd76544a257d3f3dce20082a07" },
|
||||
"nvim-surround": { "branch": "main", "commit": "9f0cb495f25bff32c936062d85046fbda0c43517" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "2a75d8065cff33216e106b651eb0f58b90375717" },
|
||||
"nvim-ts-autotag": { "branch": "main", "commit": "1cca23c9da708047922d3895a71032bc0449c52d" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "6317aca1fd86cc8e8c5ad30029ae7640d566cec6" },
|
||||
"outline.nvim": { "branch": "main", "commit": "f656ef12a590287cce57f6ee3d46a0604dfb3c14" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" },
|
||||
"telescope-fzf-native.nvim": { "branch": "main", "commit": "dae2eac9d91464448b584c7949a31df8faefec56" },
|
||||
"telescope.nvim": { "branch": "master", "commit": "2eca9ba22002184ac05eddbe47a7fe2d5a384dfc" },
|
||||
"todo-comments.nvim": { "branch": "main", "commit": "ae0a2afb47cf7395dc400e5dc4e05274bf4fb9e0" },
|
||||
"trouble.nvim": { "branch": "main", "commit": "46cf952fc115f4c2b98d4e208ed1e2dce08c9bf6" },
|
||||
"vim-cool": { "branch": "master", "commit": "662e7b11064cbeedad17c45d2fe926e78d3cd0b6" },
|
||||
"which-key.nvim": { "branch": "main", "commit": "8ab96b38a2530eacba5be717f52e04601eb59326" }
|
||||
}
|
||||
|
|
@ -16,12 +16,10 @@ autocmd("BufEnter", {
|
|||
user_command("ExportPlugins", function()
|
||||
local plugins = require("lazy").plugins()
|
||||
|
||||
local f, err = io.open("README.md", "w+")
|
||||
local f, err = io.open("plugins", "w+")
|
||||
if f then
|
||||
f:write("# neovim config\n\n")
|
||||
f:write("## plugins used\n\n")
|
||||
for _, v in ipairs(plugins) do
|
||||
local plugin = string.format("- [%s](%s)\n", v.name, v.url)
|
||||
local plugin = string.format("[%s](%s)\n", v.name, v.url)
|
||||
f:write(plugin)
|
||||
end
|
||||
|
||||
|
|
@ -2,7 +2,7 @@ return {
|
|||
{
|
||||
"saghen/blink.cmp",
|
||||
dependencies = "rafamadriz/friendly-snippets",
|
||||
version = "1.*",
|
||||
version = "v0.*",
|
||||
---@module 'blink.cmp'
|
||||
---@type blink.cmp.Config
|
||||
opts = {
|
||||
|
|
@ -15,45 +15,24 @@ return {
|
|||
keymap = { preset = "enter" },
|
||||
|
||||
appearance = {
|
||||
use_nvim_cmp_as_default = true,
|
||||
nerd_font_variant = "mono",
|
||||
},
|
||||
|
||||
signature = { enabled = true },
|
||||
|
||||
fuzzy = {
|
||||
sorts = {
|
||||
"exact",
|
||||
"score",
|
||||
"sort_text",
|
||||
},
|
||||
},
|
||||
|
||||
sources = {
|
||||
transform_items = function(_, items)
|
||||
return vim.tbl_filter(function(item)
|
||||
return item.kind ~= require("blink.cmp.types").CompletionItemKind.Snippet
|
||||
end, items)
|
||||
end,
|
||||
},
|
||||
|
||||
completion = {
|
||||
list = {
|
||||
selection = {
|
||||
preselect = false,
|
||||
auto_insert = false,
|
||||
},
|
||||
selection = "manual",
|
||||
},
|
||||
accept = {
|
||||
auto_brackets = { enabled = false },
|
||||
},
|
||||
ghost_text = {
|
||||
enabled = true,
|
||||
show_with_menu = true,
|
||||
show_without_menu = true,
|
||||
},
|
||||
-- ghost_text = {
|
||||
-- enabled = true,
|
||||
-- },
|
||||
menu = {
|
||||
draw = {
|
||||
treesitter = { "lsp" },
|
||||
columns = { { "kind_icon" }, { "label", "label_description", gap = 1 }, { "kind" } },
|
||||
},
|
||||
},
|
||||
|
|
@ -6,15 +6,27 @@ return {
|
|||
{ "j-hui/fidget.nvim", opts = {} },
|
||||
},
|
||||
config = function()
|
||||
local lspconfig = require("lspconfig")
|
||||
local capabilities = require("blink.cmp").get_lsp_capabilities()
|
||||
|
||||
-- Svelte
|
||||
-- lspconfig.svelte.setup({
|
||||
-- capabilities = capabilities,
|
||||
-- })
|
||||
|
||||
-- Markdown
|
||||
vim.lsp.enable("marksman")
|
||||
lspconfig.marksman.setup({
|
||||
capabilities = capabilities,
|
||||
})
|
||||
|
||||
-- Python
|
||||
vim.lsp.enable("pyright")
|
||||
lspconfig.pyright.setup({
|
||||
capabilities = capabilities,
|
||||
})
|
||||
|
||||
-- Rust
|
||||
vim.lsp.enable("rust_analyzer")
|
||||
vim.lsp.config("rust_analyzer", {
|
||||
lspconfig.rust_analyzer.setup({
|
||||
capabilities = capabilities,
|
||||
settings = {
|
||||
["rust-analyzer"] = {
|
||||
cargo = {
|
||||
|
|
@ -48,18 +60,22 @@ return {
|
|||
})
|
||||
|
||||
-- C
|
||||
vim.lsp.enable("clangd")
|
||||
lspconfig.clangd.setup({
|
||||
capabilities = capabilities,
|
||||
})
|
||||
|
||||
-- TOML
|
||||
vim.lsp.enable("taplo")
|
||||
lspconfig.taplo.setup({
|
||||
capabilities = capabilities,
|
||||
})
|
||||
|
||||
-- Lua
|
||||
local lua_rtp = vim.split(package.path, ";")
|
||||
table.insert(lua_rtp, "lua/?.lua")
|
||||
table.insert(lua_rtp, "lua/?/init.lua")
|
||||
|
||||
vim.lsp.enable("lua_ls")
|
||||
vim.lsp.config("lua_ls", {
|
||||
lspconfig.lua_ls.setup({
|
||||
capabilities = capabilities,
|
||||
settings = {
|
||||
Lua = {
|
||||
runtime = {
|
||||
|
|
@ -90,7 +106,9 @@ return {
|
|||
-- })
|
||||
|
||||
-- Nim
|
||||
vim.lsp.enable("nim_langserver")
|
||||
lspconfig.nim_langserver.setup({
|
||||
capabilities = capabilities,
|
||||
})
|
||||
|
||||
-- Clojure
|
||||
-- lspconfig.clojure_lsp.setup({
|
||||
|
|
@ -98,30 +116,36 @@ return {
|
|||
-- })
|
||||
|
||||
-- Gleam
|
||||
-- lspconfig.gleam.setup({
|
||||
-- capabilities = capabilities,
|
||||
-- })
|
||||
lspconfig.gleam.setup({
|
||||
capabilities = capabilities,
|
||||
})
|
||||
|
||||
-- Bash
|
||||
vim.lsp.enable("bashls")
|
||||
lspconfig.bashls.setup({
|
||||
capabilities = capabilities,
|
||||
})
|
||||
|
||||
-- HTML
|
||||
vim.lsp.enable("html")
|
||||
vim.lsp.config("html", {
|
||||
lspconfig.html.setup({
|
||||
capabilities = capabilities,
|
||||
filetypes = { "html", "templ", "htmldjango", "handlebars" },
|
||||
})
|
||||
|
||||
-- HTMX
|
||||
vim.lsp.enable("htmx")
|
||||
vim.lsp.config("htmx", {
|
||||
filetypes = { "html", "templ", "htmldjango" },
|
||||
})
|
||||
-- lspconfig.htmx.setup({
|
||||
-- capabilities = capabilities,
|
||||
-- filetypes = { "html", "templ", "htmldjango" },
|
||||
-- })
|
||||
|
||||
-- CSS
|
||||
vim.lsp.enable("cssls")
|
||||
lspconfig.cssls.setup({
|
||||
capabilities = capabilities,
|
||||
})
|
||||
|
||||
-- JSON
|
||||
vim.lsp.enable("jsonls")
|
||||
lspconfig.jsonls.setup({
|
||||
capabilities = capabilities,
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd("LspAttach", {
|
||||
group = vim.api.nvim_create_augroup("nvwynd-lsp-attach", { clear = true }),
|
||||
|
|
@ -0,0 +1,69 @@
|
|||
return {
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
build = ":TSUpdate",
|
||||
config = function()
|
||||
local configs = require("nvim-treesitter.configs")
|
||||
|
||||
vim.filetype.add({
|
||||
extension = {
|
||||
fsh = "glsl",
|
||||
vsh = "glsl",
|
||||
|
||||
hbs = "html",
|
||||
},
|
||||
})
|
||||
|
||||
vim.treesitter.language.register("html", { "handlebars", "htmldjango" })
|
||||
vim.treesitter.language.register("glsl", { "vsh", "fsh" })
|
||||
|
||||
configs.setup({
|
||||
ensure_installed = {
|
||||
-- web dev
|
||||
"html",
|
||||
"css",
|
||||
"scss",
|
||||
"javascript",
|
||||
"typescript",
|
||||
"svelte",
|
||||
|
||||
-- config
|
||||
"toml",
|
||||
"yaml",
|
||||
"markdown",
|
||||
"dockerfile",
|
||||
"just",
|
||||
|
||||
-- vim
|
||||
"vim",
|
||||
"vimdoc",
|
||||
"lua",
|
||||
"query",
|
||||
|
||||
-- the cool stuff
|
||||
"elixir",
|
||||
"heex",
|
||||
"rust",
|
||||
"python",
|
||||
"zig",
|
||||
"nim",
|
||||
"clojure",
|
||||
"gleam",
|
||||
"bash",
|
||||
"hurl",
|
||||
"gdscript",
|
||||
|
||||
-- the not so cool stuff
|
||||
"c",
|
||||
"java",
|
||||
"groovy",
|
||||
"glsl",
|
||||
"wgsl",
|
||||
},
|
||||
sync_install = false,
|
||||
highlight = { enable = true },
|
||||
indent = { enable = true },
|
||||
})
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
return {
|
||||
{
|
||||
"folke/twilight.nvim",
|
||||
opts = {},
|
||||
},
|
||||
|
||||
{
|
||||
"folke/zen-mode.nvim",
|
||||
opts = {},
|
||||
},
|
||||
}
|
||||
|
|
@ -0,0 +1,323 @@
|
|||
;; NOTE In this file later patterns are assumed to have priority!
|
||||
|
||||
;; Punctuation
|
||||
["(" ")" "[" "]" "{" "}" "(<" ">)" "[<" ">]" "{|" "|}"] @punctuation.bracket
|
||||
[";" "," ":" "::"] @punctuation.delimiter
|
||||
|
||||
;; Constant
|
||||
(const_ident) @constant
|
||||
["true" "false"] @boolean
|
||||
["null"] @constant.builtin
|
||||
|
||||
;; Variable
|
||||
[(ident) (ct_ident)] @variable
|
||||
;; 1) Member
|
||||
(field_expr field: (access_ident (ident) @variable.member))
|
||||
(struct_member_declaration (ident) @variable.member)
|
||||
(struct_member_declaration (identifier_list (ident) @variable.member))
|
||||
(bitstruct_member_declaration (ident) @variable.member)
|
||||
(initializer_list (arg (param_path (param_path_element (ident) @variable.member))))
|
||||
;; 2) Parameter
|
||||
(parameter name: (_) @variable.parameter)
|
||||
(call_invocation (arg (param_path (param_path_element [(ident) (ct_ident)] @variable.parameter))))
|
||||
(enum_param_declaration (ident) @variable.parameter)
|
||||
;; 3) Declaration
|
||||
(global_declaration (ident) @variable.declaration)
|
||||
(local_decl_after_type name: [(ident) (ct_ident)] @variable.declaration)
|
||||
(var_decl name: [(ident) (ct_ident)] @variable.declaration)
|
||||
(try_unwrap (ident) @variable.declaration)
|
||||
(catch_unwrap (ident) @variable.declaration)
|
||||
|
||||
;; Keyword (from `c3c --list-keywords`)
|
||||
[
|
||||
"assert"
|
||||
"asm"
|
||||
"catch"
|
||||
"defer"
|
||||
"try"
|
||||
"var"
|
||||
] @keyword
|
||||
|
||||
[
|
||||
"$alignof"
|
||||
"$and"
|
||||
"$append"
|
||||
"$assert"
|
||||
"$assignable"
|
||||
"$case"
|
||||
"$concat"
|
||||
"$default"
|
||||
"$defined"
|
||||
"$echo"
|
||||
"$else"
|
||||
"$embed"
|
||||
"$endfor"
|
||||
"$endforeach"
|
||||
"$endif"
|
||||
"$endswitch"
|
||||
"$eval"
|
||||
"$evaltype"
|
||||
"$error"
|
||||
"$exec"
|
||||
"$extnameof"
|
||||
"$feature"
|
||||
"$for"
|
||||
"$foreach"
|
||||
"$if"
|
||||
"$include"
|
||||
"$is_const"
|
||||
"$nameof"
|
||||
"$offsetof"
|
||||
"$or"
|
||||
"$qnameof"
|
||||
"$sizeof"
|
||||
"$stringify"
|
||||
"$switch"
|
||||
"$typefrom"
|
||||
"$typeof"
|
||||
"$vacount"
|
||||
"$vatype"
|
||||
"$vaconst"
|
||||
"$varef"
|
||||
"$vaarg"
|
||||
"$vaexpr"
|
||||
"$vasplat"
|
||||
] @keyword.directive
|
||||
|
||||
"fn" @keyword.function
|
||||
"macro" @keyword.function
|
||||
"return" @keyword.return
|
||||
"import" @keyword.import
|
||||
"module" @keyword.module
|
||||
|
||||
[
|
||||
"bitstruct"
|
||||
"def"
|
||||
"distinct"
|
||||
"enum"
|
||||
"fault"
|
||||
"interface"
|
||||
"struct"
|
||||
"union"
|
||||
] @keyword.type
|
||||
|
||||
[
|
||||
"case"
|
||||
"default"
|
||||
"else"
|
||||
"if"
|
||||
"nextcase"
|
||||
"switch"
|
||||
] @keyword.conditional
|
||||
|
||||
[
|
||||
"break"
|
||||
"continue"
|
||||
"do"
|
||||
"for"
|
||||
"foreach"
|
||||
"foreach_r"
|
||||
"while"
|
||||
] @keyword.repeat
|
||||
|
||||
[
|
||||
"const"
|
||||
"extern"
|
||||
"inline"
|
||||
"static"
|
||||
"tlocal"
|
||||
] @keyword.modifier
|
||||
|
||||
;; Operator (from `c3c --list-operators`)
|
||||
[
|
||||
"&"
|
||||
"!"
|
||||
"~"
|
||||
"|"
|
||||
"^"
|
||||
;; ":"
|
||||
;; ","
|
||||
;; ";"
|
||||
"="
|
||||
">"
|
||||
"/"
|
||||
"."
|
||||
;; "#"
|
||||
"<"
|
||||
;; "{"
|
||||
;; "["
|
||||
;; "("
|
||||
"-"
|
||||
"%"
|
||||
"+"
|
||||
"?"
|
||||
;; "}"
|
||||
;; "]"
|
||||
;; ")"
|
||||
"*"
|
||||
;; "_"
|
||||
"&&"
|
||||
;; "->"
|
||||
"!!"
|
||||
"&="
|
||||
"|="
|
||||
"^="
|
||||
"/="
|
||||
".."
|
||||
"?:"
|
||||
"=="
|
||||
">="
|
||||
"=>"
|
||||
"<="
|
||||
;; "{|"
|
||||
;; "(<"
|
||||
;; "[<"
|
||||
"-="
|
||||
"--"
|
||||
"%="
|
||||
"*="
|
||||
"!="
|
||||
"||"
|
||||
"+="
|
||||
"++"
|
||||
;; "|}"
|
||||
;; ">)"
|
||||
;; ">]"
|
||||
"??"
|
||||
;; "::"
|
||||
"<<"
|
||||
">>"
|
||||
"..."
|
||||
"<<="
|
||||
">>="
|
||||
] @operator
|
||||
|
||||
(range_expr ":" @operator)
|
||||
(foreach_cond ":" @operator)
|
||||
|
||||
(ternary_expr
|
||||
[
|
||||
"?"
|
||||
":"
|
||||
] @keyword.conditional.ternary)
|
||||
|
||||
(elvis_orelse_expr
|
||||
[
|
||||
"?:"
|
||||
"??"
|
||||
] @keyword.conditional.ternary)
|
||||
|
||||
;; Literal
|
||||
(integer_literal) @number
|
||||
(real_literal) @number.float
|
||||
(char_literal) @character
|
||||
(bytes_literal) @number
|
||||
|
||||
;; String
|
||||
(string_literal) @string
|
||||
(raw_string_literal) @string
|
||||
|
||||
;; Escape Sequence
|
||||
(escape_sequence) @string.escape
|
||||
|
||||
;; Builtin (constants)
|
||||
((builtin) @constant.builtin (#match? @constant.builtin "_*[A-Z][_A-Z0-9]*"))
|
||||
|
||||
;; Type Property (from `c3c --list-type-properties`)
|
||||
(type_access_expr (access_ident [(ident) "typeid"] @variable.builtin
|
||||
(#any-of? @variable.builtin
|
||||
"alignof"
|
||||
"associated"
|
||||
"elements"
|
||||
"extnameof"
|
||||
"inf"
|
||||
"is_eq"
|
||||
"is_ordered"
|
||||
"is_substruct"
|
||||
"len"
|
||||
"max"
|
||||
"membersof"
|
||||
"min"
|
||||
"nan"
|
||||
"inner"
|
||||
"kindof"
|
||||
"names"
|
||||
"nameof"
|
||||
"params"
|
||||
"parentof"
|
||||
"qnameof"
|
||||
"returns"
|
||||
"sizeof"
|
||||
"values"
|
||||
;; Extra token
|
||||
"typeid")))
|
||||
|
||||
;; Label
|
||||
[
|
||||
(label)
|
||||
(label_target)
|
||||
] @label
|
||||
|
||||
;; Module
|
||||
(module_resolution (ident) @module)
|
||||
(module (path_ident (ident) @module))
|
||||
(import_declaration (path_ident (ident) @module))
|
||||
|
||||
;; Attribute
|
||||
(attribute name: (_) @attribute)
|
||||
(define_attribute name: (_) @attribute)
|
||||
(call_inline_attributes (at_ident) @attribute)
|
||||
(asm_block_stmt (at_ident) @attribute)
|
||||
|
||||
;; Type
|
||||
[
|
||||
(type_ident)
|
||||
(ct_type_ident)
|
||||
] @type
|
||||
(base_type_name) @type.builtin
|
||||
|
||||
;; Function Definition
|
||||
(func_header name: (_) @function)
|
||||
(func_header method_type: (_) name: (_) @function.method)
|
||||
;; NOTE macro_declaration can also have a func_header
|
||||
(macro_header name: (_) @function)
|
||||
(macro_header method_type: (_) name: (_) @function.method)
|
||||
|
||||
;; Function Call
|
||||
(call_expr function: [(ident) (at_ident)] @function.call)
|
||||
(call_expr function: [(builtin)] @function.builtin.call)
|
||||
(call_expr function: (module_ident_expr ident: (_) @function.call))
|
||||
(call_expr function: (trailing_generic_expr argument: (module_ident_expr ident: (_) @function.call)))
|
||||
(call_expr function: (field_expr field: (access_ident [(ident) (at_ident)] @function.method.call))) ; NOTE Ambiguous, could be calling a method or function pointer
|
||||
;; Method on type
|
||||
(call_expr function: (type_access_expr field: (access_ident [(ident) (at_ident)] @function.method.call)))
|
||||
|
||||
;; Assignment
|
||||
;; (assignment_expr left: (ident) @variable.member)
|
||||
;; (assignment_expr left: (module_ident_expr (ident) @variable.member))
|
||||
;; (assignment_expr left: (field_expr field: (_) @variable.member))
|
||||
;; (assignment_expr left: (unary_expr operator: "*" @variable.member))
|
||||
;; (assignment_expr left: (subscript_expr ["[" "]"] @variable.member))
|
||||
|
||||
;; (update_expr argument: (ident) @variable.member)
|
||||
;; (update_expr argument: (module_ident_expr ident: (ident) @variable.member))
|
||||
;; (update_expr argument: (field_expr field: (_) @variable.member))
|
||||
;; (update_expr argument: (unary_expr operator: "*" @variable.member))
|
||||
;; (update_expr argument: (subscript_expr ["[" "]"] @variable.member))
|
||||
|
||||
;; (unary_expr operator: ["--" "++"] argument: (ident) @variable.member)
|
||||
;; (unary_expr operator: ["--" "++"] argument: (module_ident_expr (ident) @variable.member))
|
||||
;; (unary_expr operator: ["--" "++"] argument: (field_expr field: (access_ident (ident)) @variable.member))
|
||||
;; (unary_expr operator: ["--" "++"] argument: (subscript_expr ["[" "]"] @variable.member))
|
||||
|
||||
;; Asm
|
||||
(asm_instr [(ident) "int"] @function.builtin)
|
||||
(asm_expr [(ct_ident) (ct_const_ident)] @variable.builtin)
|
||||
|
||||
;; Comment
|
||||
[
|
||||
(line_comment)
|
||||
(block_comment)
|
||||
] @comment @spell
|
||||
|
||||
(doc_comment) @comment.documentation @spell
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
#!/bin/bash
|
||||
(
|
||||
for FOLDER in ./*/; do
|
||||
# gio set "$FOLDER" -t unset metadata::custom-icon
|
||||
for img in ./"$FOLDER"/*; do
|
||||
if [[ ${img##*.} == "jpg" ]] || [[ ${img##*.} == "png" ]] || [[ ${img##*.} == "webp" ]]; then
|
||||
IMAGENAME="$(basename "$img")"
|
||||
break
|
||||
fi
|
||||
done
|
||||
if [[ -n $IMAGENAME ]]; then
|
||||
gio set "$FOLDER" -t string metadata::custom-icon "$IMAGENAME"
|
||||
unset IMAGENAME
|
||||
fi
|
||||
done
|
||||
)
|
||||
|
|
@ -62,14 +62,15 @@ export PATH="$GEMS_HOME/bin:$PATH"
|
|||
export NIMBLE_HOME="$HOME/.nimble"
|
||||
export PATH="$NIMBLE_HOME/bin:$PATH"
|
||||
|
||||
# bun
|
||||
export BUN_HOME="$HOME/.bun"
|
||||
export PATH="$BUN_HOME/bin:$PATH"
|
||||
[ -s "$BUN_HOME/_bun" ] && source "/$BUN_HOME/_bun"
|
||||
|
||||
# asdf setup
|
||||
source "$HOME/.asdf/asdf.sh"
|
||||
fpath=(${ASDF_DIR}/completions $fpath)
|
||||
|
||||
# JVM setup
|
||||
export JAVA_HOME=/usr/lib/jvm/java-21-temurin
|
||||
export PATH=$JAVA_HOME/bin:$PATH
|
||||
|
||||
# fzf setup
|
||||
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
|
||||
|
||||
|
|
@ -98,7 +99,7 @@ alias myip="curl http://ipecho.net/plain; echo"
|
|||
alias diskspace="df -ht ext4"
|
||||
alias since="days_since"
|
||||
alias ytwav="yt-dlp -x --audio-format wav"
|
||||
alias ytmp3="yt-dlp -x --audio-format mp3 --embed-thumbnail"
|
||||
alias ytmp3="yt-dlp -x --audio-format mp3"
|
||||
alias ytdv="yt-dlp"
|
||||
alias docker-clean="docker system prune -a --filter \"until=72h\""
|
||||
alias flatpak-clean="flatpak uninstall --user --unused"
|
||||
|
|
@ -135,15 +136,16 @@ function days_since() {(
|
|||
|
||||
alias repos="~/.local/bin/repos.sh"
|
||||
alias reposn="~/.local/bin/reposn.sh"
|
||||
alias repoc="~/.local/bin/repoc.sh"
|
||||
alias repos5y="~/.local/bin/repos5y.sh"
|
||||
alias repoc5y="~/.local/bin/repoc5y.sh"
|
||||
alias reposl="~/.local/bin/reposl.sh"
|
||||
alias repo5y="~/.local/bin/repo5y.sh"
|
||||
|
||||
# private SSH stuff
|
||||
source ~/.piwrc
|
||||
|
||||
# JVM switches
|
||||
alias use-java8='export JAVA_HOME=/usr/lib/jvm/java-8-temurin;export PATH=$JAVA_HOME/bin:$PATH'
|
||||
alias use-java11='export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64;export PATH=$JAVA_HOME/bin:$PATH'
|
||||
alias use-java17='export JAVA_HOME=/usr/lib/jvm/java-17-temurin;export PATH=$JAVA_HOME/bin:$PATH'
|
||||
alias use-java21='export JAVA_HOME=/usr/lib/jvm/java-21-temurin;export PATH=$JAVA_HOME/bin:$PATH'
|
||||
|
||||
# changing GREP highlight color
|
||||
|
|
@ -169,3 +171,6 @@ figlet -f 'Red Phoenix' Wynd | lolcat
|
|||
|
||||
# starts starship
|
||||
eval "$(starship init zsh)"
|
||||
|
||||
# bun completions
|
||||
[ -s "/home/wynd/.bun/_bun" ] && source "/home/wynd/.bun/_bun"
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
{
|
||||
"Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" },
|
||||
"blink.cmp": { "branch": "main", "commit": "b19413d214068f316c78978b08264ed1c41830ec" },
|
||||
"catppuccin": { "branch": "main", "commit": "beaf41a30c26fd7d6c386d383155cbd65dd554cd" },
|
||||
"conform.nvim": { "branch": "master", "commit": "5ac2bb57a9096f00ca50e1a3c46020d5930319b8" },
|
||||
"dressing.nvim": { "branch": "master", "commit": "2d7c2db2507fa3c4956142ee607431ddb2828639" },
|
||||
"fidget.nvim": { "branch": "main", "commit": "7fa433a83118a70fe24c1ce88d5f0bd3453c0970" },
|
||||
"friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" },
|
||||
"git-conflict.nvim": { "branch": "main", "commit": "4bbfdd92d547d2862a75b4e80afaf30e73f7bbb4" },
|
||||
"hurl.nvim": { "branch": "main", "commit": "0e5430d5130fe95fc1b8b015491b50274aa2e796" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" },
|
||||
"lazydev.nvim": { "branch": "main", "commit": "5231c62aa83c2f8dc8e7ba957aa77098cda1257d" },
|
||||
"lualine.nvim": { "branch": "master", "commit": "47f91c416daef12db467145e16bed5bbfe00add8" },
|
||||
"luvit-meta": { "branch": "main", "commit": "0ea4ff636c5bb559ffa78108561d0976f4de9682" },
|
||||
"mini.map": { "branch": "main", "commit": "32a3a5d9a7c074dbb0a4a1d5943d09cb8edbab3f" },
|
||||
"neo-tree.nvim": { "branch": "v3.x", "commit": "f3df514fff2bdd4318127c40470984137f87b62e" },
|
||||
"nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "92ee7d42320edfbb81f3cad851314ab197fa324a" },
|
||||
"nvim-notify": { "branch": "master", "commit": "8701bece920b38ea289b457f902e2ad184131a5d" },
|
||||
"nvim-surround": { "branch": "main", "commit": "1098d7b3c34adcfa7feb3289ee434529abd4afd1" },
|
||||
"nvim-treesitter": { "branch": "main", "commit": "d19def46c112c26c17adeef88dd1253cc6d623a1" },
|
||||
"nvim-ts-autotag": { "branch": "main", "commit": "c4ca798ab95b316a768d51eaaaee48f64a4a46bc" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "803353450c374192393f5387b6a0176d0972b848" },
|
||||
"outline.nvim": { "branch": "main", "commit": "1967ef50036b0b1eac4977aeede55915a741afe0" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
|
||||
"telescope-fzf-native.nvim": { "branch": "main", "commit": "6fea601bd2b694c6f2ae08a6c6fab14930c60e2c" },
|
||||
"telescope.nvim": { "branch": "master", "commit": "a8c2223ea6b185701090ccb1ebc7f4e41c4c9784" },
|
||||
"todo-comments.nvim": { "branch": "main", "commit": "31e3c38ce9b29781e4422fc0322eb0a21f4e8668" },
|
||||
"trouble.nvim": { "branch": "main", "commit": "bd67efe408d4816e25e8491cc5ad4088e708a69a" },
|
||||
"vim-cool": { "branch": "master", "commit": "9ea940c0d537e55de0de4c0298c04b976960fb12" },
|
||||
"which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" }
|
||||
}
|
||||
|
|
@ -1,73 +0,0 @@
|
|||
return {
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
build = ":TSUpdate",
|
||||
config = function()
|
||||
local ts = require("nvim-treesitter")
|
||||
|
||||
vim.filetype.add({
|
||||
extension = {
|
||||
fsh = "glsl",
|
||||
vsh = "glsl",
|
||||
|
||||
hbs = "html",
|
||||
},
|
||||
})
|
||||
|
||||
ts.install({
|
||||
-- web dev
|
||||
"html",
|
||||
"css",
|
||||
"scss",
|
||||
"javascript",
|
||||
"typescript",
|
||||
"svelte",
|
||||
|
||||
-- config
|
||||
"toml",
|
||||
"yaml",
|
||||
"markdown",
|
||||
"dockerfile",
|
||||
"just",
|
||||
|
||||
-- vim
|
||||
"vim",
|
||||
"vimdoc",
|
||||
"lua",
|
||||
"query",
|
||||
|
||||
-- the cool stuff
|
||||
"elixir",
|
||||
"heex",
|
||||
"rust",
|
||||
"python",
|
||||
"zig",
|
||||
"nim",
|
||||
"clojure",
|
||||
"gleam",
|
||||
"bash",
|
||||
"hurl",
|
||||
"gdscript",
|
||||
|
||||
-- the not so cool stuff
|
||||
"c",
|
||||
"java",
|
||||
"groovy",
|
||||
"glsl",
|
||||
"wgsl",
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
pattern = { "<filetype>" },
|
||||
callback = function()
|
||||
vim.treesitter.start()
|
||||
end,
|
||||
})
|
||||
|
||||
vim.wo[0][0].foldexpr = "v:lua.vim.treesitter.foldexpr()"
|
||||
vim.wo[0][0].foldmethod = "expr"
|
||||
|
||||
vim.bo.indentexpr = "v:lua.require'nvim-treesitter'.indentexpr()"
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
(
|
||||
ROOT="$(pwd)"
|
||||
clear
|
||||
git-heatmap -a="Wynd" --root-dir "$ROOT" --split-months --months-per-row 7 --format numbers --use-author-time $@
|
||||
)
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
(
|
||||
ROOT="$(pwd)"
|
||||
clear
|
||||
git-heatmap \
|
||||
-r "$ROOT" -b "" \
|
||||
-a "Wynd" --since $(date -d "5 years ago" +%Y-%m-%d) --until today \
|
||||
--months-per-row 12 --split-months --use-author-time $@
|
||||
)
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
(
|
||||
paths=(
|
||||
"/home/wynd/Programming/Archive"
|
||||
"/home/wynd/Programming/Active"
|
||||
"/home/wynd/Lab"
|
||||
)
|
||||
|
||||
root_dir=""
|
||||
for f in ${paths[@]}; do
|
||||
root_dir="$root_dir--root-dir $f "
|
||||
done
|
||||
|
||||
clear
|
||||
git-heatmap \
|
||||
$root_dir \
|
||||
-a="Wynd" --split-months --use-author-time $@
|
||||
)
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
(
|
||||
paths=(
|
||||
"/home/wynd/Programming/Archive"
|
||||
"/home/wynd/Programming/Active"
|
||||
"/home/wynd/Lab"
|
||||
)
|
||||
|
||||
root_dir=""
|
||||
for f in ${paths[@]}; do
|
||||
root_dir="$root_dir--root-dir $f "
|
||||
done
|
||||
|
||||
clear
|
||||
git-heatmap \
|
||||
$root_dir \
|
||||
-a "Wynd" --since $(date -d "5 years ago" +%Y-%m-%d) --until today \
|
||||
--months-per-row 12 --split-months --use-author-time $@
|
||||
)
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
(
|
||||
paths=(
|
||||
"/home/wynd/Programming/Archive"
|
||||
"/home/wynd/Programming/Active"
|
||||
"/home/wynd/Lab"
|
||||
)
|
||||
|
||||
root_dir=""
|
||||
for f in ${paths[@]}; do
|
||||
root_dir="$root_dir--root-dir $f "
|
||||
done
|
||||
|
||||
clear
|
||||
git-heatmap \
|
||||
$root_dir \
|
||||
-a="Wynd" --split-months --months-per-row 7 --format numbers --use-author-time $@
|
||||
)
|
||||
49
dot.py
49
dot.py
|
|
@ -2,37 +2,18 @@
|
|||
|
||||
import os
|
||||
import re
|
||||
import shutil
|
||||
from shutil import copyfile
|
||||
from toml import load
|
||||
from glob import glob
|
||||
from argparse import ArgumentParser
|
||||
|
||||
FG_GREEN = "\x1b[32m"
|
||||
FG_RED = "\x1b[31m"
|
||||
BACKUP_FOLDER = "./backup"
|
||||
|
||||
|
||||
def is_root() -> bool:
|
||||
"""
|
||||
Not the most "correct" way but since this is for personal usage I don't care
|
||||
"""
|
||||
return os.geteuid() == 0
|
||||
|
||||
|
||||
def manage_dot_files(dots, deploy=False, wipe=False):
|
||||
if wipe:
|
||||
# Nuke everything and bring the new stuff in
|
||||
# Easy way to remove old stuff thats no longer linked in dot.toml
|
||||
if not deploy:
|
||||
shutil.rmtree(BACKUP_FOLDER)
|
||||
|
||||
os.makedirs(BACKUP_FOLDER, exist_ok=True)
|
||||
|
||||
def manage_dot_files(dots, deploy=False):
|
||||
home_path = os.path.expanduser("~/")
|
||||
for dot in dots:
|
||||
path = os.path.expanduser(dot["path"])
|
||||
if deploy:
|
||||
path = BACKUP_FOLDER + path
|
||||
|
||||
path = str(path).replace(home_path, "./")
|
||||
ignore_list = dot["ignore"] if "ignore" in dot else []
|
||||
for file in glob(path, recursive=True):
|
||||
exp_pass = True
|
||||
|
|
@ -41,18 +22,14 @@ def manage_dot_files(dots, deploy=False, wipe=False):
|
|||
if match is not None:
|
||||
exp_pass = False
|
||||
break
|
||||
|
||||
if exp_pass and os.path.isfile(file):
|
||||
if deploy:
|
||||
dest_path = file.replace(BACKUP_FOLDER, "")
|
||||
dest_path = file.replace("./", home_path)
|
||||
else:
|
||||
dest_path = BACKUP_FOLDER + file
|
||||
dest_path = file.replace(home_path, "./")
|
||||
os.makedirs(os.path.dirname(dest_path), exist_ok=True)
|
||||
try:
|
||||
shutil.copy(file, dest_path)
|
||||
print(f"{FG_GREEN}{file} -> {dest_path}")
|
||||
except OSError:
|
||||
print(f"{FG_RED}{file} requires root access to write, skipping")
|
||||
copyfile(file, dest_path)
|
||||
print(f"{file} -> {dest_path}")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
|
@ -75,18 +52,10 @@ if __name__ == "__main__":
|
|||
default=False,
|
||||
dest="deploy",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--wipe",
|
||||
action="store_true",
|
||||
help="Wipes the backup folder before bringing in the new backups, only works with --init flag",
|
||||
required=False,
|
||||
default=True,
|
||||
dest="wipe",
|
||||
)
|
||||
args = parser.parse_args()
|
||||
|
||||
if args.init:
|
||||
manage_dot_files(config, False, args.wipe)
|
||||
manage_dot_files(config)
|
||||
elif args.deploy:
|
||||
manage_dot_files(config, True)
|
||||
else:
|
||||
|
|
|
|||
24
dot.toml
24
dot.toml
|
|
@ -15,6 +15,7 @@ path = "~/.config/tmux/tmux.conf"
|
|||
|
||||
[[dots]]
|
||||
path = "~/.config/nvim/**/*"
|
||||
ignore = ["README.md$", "/plugins$"]
|
||||
|
||||
[[dots]]
|
||||
path = "~/.config/mpv/*.conf"
|
||||
|
|
@ -37,23 +38,6 @@ path = "~/.local/bin/best-gif.sh"
|
|||
[[dots]]
|
||||
path = "~/.local/bin/make-gif.sh"
|
||||
|
||||
[[dots]]
|
||||
path = "~/.local/bin/repos.sh"
|
||||
|
||||
[[dots]]
|
||||
path = "~/.local/bin/reposn.sh"
|
||||
|
||||
[[dots]]
|
||||
path = "~/.local/bin/repos5y.sh"
|
||||
|
||||
[[dots]]
|
||||
path = "~/.local/bin/repoc.sh"
|
||||
|
||||
[[dots]]
|
||||
path = "~/.local/bin/repoc5y.sh"
|
||||
|
||||
[[dots]]
|
||||
path = "/etc/hosts"
|
||||
|
||||
[[dots]]
|
||||
path = "/etc/fstab"
|
||||
# [[dots]]
|
||||
# path = "~/.config/nushell/*"
|
||||
# ignore = ["history.txt", "/completions$"]
|
||||
|
|
|
|||
|
|
@ -9,4 +9,3 @@
|
|||
127.0.0.1 food.wynd.local
|
||||
127.0.0.1 firefly.wynd.local
|
||||
127.0.0.1 vault.wynd.local
|
||||
127.0.0.1 test.wynd.local
|
||||
Loading…
Reference in New Issue