Replaced neodev with lazydev and a new script to fix opening nvim via a file manager

master
Wynd 2024-06-05 15:49:29 +03:00
parent 55294be378
commit a27480b02b
8 changed files with 62 additions and 4 deletions

View File

@ -11,10 +11,11 @@
"fidget.nvim": { "branch": "main", "commit": "1ba38e4cbb24683973e00c2e36f53ae64da38ef5" },
"image.nvim": { "branch": "master", "commit": "cdf1be9c708e75be936cc42d8122b748a51482e4" },
"lazy.nvim": { "branch": "main", "commit": "3f13f080434ac942b150679223d54f5ca91e0d52" },
"lazydev.nvim": { "branch": "main", "commit": "107231114623e2c4f90c626ec83b3120816b554e" },
"lsp-zero.nvim": { "branch": "v3.x", "commit": "b93f040edd57888cd6a1e7d9dee47dddc4463f8f" },
"lspkind.nvim": { "branch": "master", "commit": "1735dd5a5054c1fb7feaf8e8658dbab925f4f0cf" },
"luvit-meta": { "branch": "main", "commit": "ce76f6f6cdc9201523a5875a4471dcfe0186eb60" },
"neo-tree.nvim": { "branch": "v3.x", "commit": "7aad1bf3f6b849cbf108e02c55ad4d701cb4d33a" },
"neodev.nvim": { "branch": "main", "commit": "ce9a2e8eaba5649b553529c5498acb43a6c317cd" },
"nui.nvim": { "branch": "main", "commit": "cbd2668414331c10039278f558630ed19b93e69b" },
"nvim-autopairs": { "branch": "master", "commit": "4f41e5940bc0443fdbe5f995e2a596847215cd2a" },
"nvim-cmp": { "branch": "main", "commit": "8f3c541407e691af6163e2447f3af1bd6e17f9a3" },

View File

@ -11,6 +11,13 @@ return {
"L3MON4D3/LuaSnip",
"saadparwaiz1/cmp_luasnip",
},
opts = function(_, opts)
opts.sources = opts.sources or {}
table.insert(opts.sources, {
name = "lazydev",
group_index = 0,
})
end,
config = function()
vim.opt.completeopt = { "menu", "menuone", "noselect" }

View File

@ -91,6 +91,11 @@ return {
capabilities = capabilities,
})
-- JSON
lspconfig.jsonls.setup({
capabilities = capabilities,
})
vim.api.nvim_create_autocmd("LspAttach", {
group = vim.api.nvim_create_augroup("nvwynd-lsp-attach", { clear = true }),
callback = function(event)
@ -130,7 +135,25 @@ return {
},
{
"folke/neodev.nvim",
opts = {},
"folke/lazydev.nvim",
ft = "lua",
opts = {
library = {
{
path = "luvit-meta/library",
words = { "vim%.uv" },
},
},
},
},
{
"Bilal2453/luvit-meta",
lazy = true,
},
-- {
-- "folke/neodev.nvim",
-- opts = {},
-- },
}

View File

@ -13,3 +13,14 @@ NPCs
NPC
Glowstone
Eisen
flatpak
github
oauth
debian
LTS
flarum
piw
Gitea
Hetzner
overworld
WIP

Binary file not shown.

View File

@ -0,0 +1,8 @@
#!/bin/sh
# For some unexplainable reason (probably some GNOME "feature") opening nvim from a file manager (any)
# via its .desktop file doesn't fully load the user's PATH so we forcing it
# This doesn't happen when opening from a terminal however.
export PATH=$PATH:/home/wynd/.asdf/shims/ \
&& env -u WAYLAND_DISPLAY alacritty -e nvim "$1"

7
.zshrc
View File

@ -79,8 +79,13 @@ alias myip="curl http://ipecho.net/plain; echo"
alias diskspace="df -ht ext4"
# git shortcuts
alias git-line-stats="git ls-files | xargs -n1 git blame --line-porcelain | sed -n 's/^author //p' | sort -f | uniq -ic | sort -nr"
alias glo="git log --pretty='format:%C(yellow)%as %C(blue)%cn %C(green)%h %C(reset)%s' --no-merges"
alias glm="git_last_modified"
function git_last_modified() {(
days=${1:-5}
git diff $(git log -1 --before=@{$days.days.ago} --format=%H) --stat
)}
# private SSH stuff
source ~/.piwrc

View File

@ -24,3 +24,6 @@ path = "~/.config/btop/btop.conf"
[[dots]]
path = "~/.config/alacritty/*"
[[dots]]
path = "~/.local/bin/nvimstart.sh"