Compare commits

..
54 changed files with 617 additions and 675 deletions

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
lazy-lock.json

8
after/ftplugin/cabal.lua Normal file
View file

@ -0,0 +1,8 @@
local conf = vim.lsp.config.hls
vim.lsp.config("hls", conf)
vim.lsp.enable("hls")
vim.o.tabstop = 2
vim.o.softtabstop = 0
vim.o.shiftwidth = 0
vim.o.expandtab = true

View file

@ -0,0 +1,12 @@
local port = tonumber(os.getenv("GDScript_Port")) or 6005
local cmd = vim.lsp.rpc.connect("127.0.0.1", port)
local pipe = "/tmp/godot.pipe" -- I use /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,
})

View file

@ -0,0 +1,8 @@
local conf = vim.lsp.config.hls
vim.lsp.config("hls", conf)
vim.lsp.enable("hls")
vim.o.tabstop = 2
vim.o.softtabstop = 0
vim.o.shiftwidth = 0
vim.o.expandtab = true

View file

@ -0,0 +1,8 @@
local conf = vim.lsp.config.hls
vim.lsp.config("hls", conf)
vim.lsp.enable("hls")
vim.o.tabstop = 2
vim.o.softtabstop = 0
vim.o.shiftwidth = 0
vim.o.expandtab = true

3
after/ftplugin/norg.lua Normal file
View file

@ -0,0 +1,3 @@
vim.opt.conceallevel = 2
vim.opt.concealcursor = "nc"
vim.opt.foldlevel = 99

4
after/ftplugin/qml.lua Normal file
View file

@ -0,0 +1,4 @@
local conf = vim.lsp.config.qmlls
conf.root_markers = { ".qmlls.ini" }
vim.lsp.config("qmlls", conf)
vim.lsp.enable("qmlls")

0
after/ftplugin/zig.lua Normal file
View file

View file

@ -1,40 +1,4 @@
require("config.lazy")
require("config.general") require("config.general")
require("config.autocmd")
require("config.lsp") require("config.lsp")
local plugins = {
"web-icons",
"markdown",
"blink-cmp",
"lsp",
"mason-bridge",
"mason",
"formatter",
"treesitter",
"nvim-lint",
"neorg",
"nightfox",
"statusline",
"ansi",
"rpc",
"utils",
"images",
"diagrams",
"table-mode",
"plenary",
"fuzzyfind",
"latex",
}
local putils = require("utils.plugins")
for _, plugin in pairs(plugins) do
putils.parse(putils.get(plugin))
end

17
lsp/ocamllsp.lua Normal file
View file

@ -0,0 +1,17 @@
return {
cmd = { "ocamllsp" },
filetypes = {
"ocaml",
"ocaml.interface",
"ocaml.menhir",
"ocaml.ocamllex",
"dune",
"reason",
},
root_markers = {
{ "dune-project", "dune-workspace" },
{ "*.opam", "esy.json", "package.json" },
".git",
},
settings = {},
}

12
lua/config/autocmd.lua Normal file
View file

@ -0,0 +1,12 @@
-- put this in your init.lua
vim.api.nvim_create_autocmd({ "BufEnter", "BufWinEnter" }, {
pattern = { "*.yuck" },
callback = function(event)
print(string.format("starting yuck;s for %s", vim.inspect(event)))
vim.lsp.start({
name = "YuckLs",
cmd = { "yuckls" }, -- if installed from aur
root_dir = vim.fn.getcwd(),
})
end,
})

View file

@ -3,7 +3,7 @@ vim.opt.softtabstop = 0
vim.opt.shiftwidth = 0 vim.opt.shiftwidth = 0
vim.opt.smartindent = true vim.opt.smartindent = true
vim.opt.shell, _ = vim.system({ "which", "bash" }, { text = true }):wait().stdout:gsub("\n.*", "") vim.opt.shell = "/bin/bash"
vim.opt.linebreak = true vim.opt.linebreak = true
vim.cmd("set wrap smoothscroll") vim.cmd("set wrap smoothscroll")
@ -17,11 +17,7 @@ vim.keymap.set("t", "<Esc>", "<C-\\><C-N>", {})
vim.keymap.set("n", ".", ":", {}) vim.keymap.set("n", ".", ":", {})
vim.keymap.set("i", "jk", "␛", {}) vim.keymap.set("i", "jk", "", {})
vim.cmd("nnoremap <Space> <Nop>")
vim.g.mapleader = " "
vim.g.maplocalleader = ","
vim.opt.termguicolors = true vim.opt.termguicolors = true
@ -34,7 +30,3 @@ vim.cmd("nnoremap j gj")
vim.cmd("nnoremap k gk") vim.cmd("nnoremap k gk")
vim.g.zig_fmt_parse_errors = 0 vim.g.zig_fmt_parse_errors = 0
vim.o.modeline = true
vim.o.exrc = true
vim.o.secure = true

28
lua/config/lazy.lua Normal file
View file

@ -0,0 +1,28 @@
-- Bootstrap lazy.nvim
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not (vim.uv or vim.loop).fs_stat(lazypath) then
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
if vim.v.shell_error ~= 0 then
vim.api.nvim_echo({
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
{ out, "WarningMsg" },
{ "\nPress any key to exit..." },
}, true, {})
vim.fn.getchar()
os.exit(1)
end
end
vim.opt.rtp:prepend(lazypath)
-- Make sure to setup `mapleader` and `maplocalleader` before
-- loading lazy.nvim so that mappings are correct.
-- This is also a good place to setup other settings (vim.opt)
vim.cmd("nnoremap <Space> <Nop>")
vim.g.mapleader = " "
vim.g.maplocalleader = ","
vim.keymap.set("n", "<leader>l", function() require"lazy".home() end, { silent = true, desc = "open lazy.nvim"})
-- Setup lazy.nvim
require("lazy").setup("plugins")

View file

@ -1,3 +1,4 @@
-- lsp that are not on mason/beta branch lsp
vim.lsp.enable("zls") vim.lsp.enable("zls")
vim.lsp.enable("ocamllsp") vim.lsp.enable("ocamllsp")
vim.lsp.enable("ocamllsp") vim.lsp.enable("ocamllsp")
@ -8,4 +9,3 @@ vim.lsp.config("llvm-ir-lsp", {
cmd = { "llvm-ir-lsp" }, cmd = { "llvm-ir-lsp" },
filetypes = { "llvm" }, filetypes = { "llvm" },
}) })

View file

@ -1,11 +1,8 @@
---@module "utils.plugins"
---@type Plugin
return { return {
configure = function(load) "0xferrous/ansi.nvim",
load("0xferrous/ansi.nvim") config = true,
require("ansi").setup({ opts = {
auto_enable = false, -- Auto-enable for configured filetypes auto_enable = false, -- Auto-enable for configured filetypes
filetypes = { "log", "ansi" }, -- Filetypes to auto-enable filetypes = { "log", "ansi" }, -- Filetypes to auto-enable
}) },
end,
} }

View file

@ -1,55 +0,0 @@
---@module "utils.plugins"
---@type Plugin
return {
configures = "blink.cmp",
configure = function(load)
load("folke/lazydev.nvim")
require("lazydev").setup({})
load("rafamadriz/friendly-snippets")
load("saghen/blink.lib")
load("saghen/blink.cmp")
---@module "blink.cmp"
require("blink.cmp").setup({
keymap = { preset = "super-tab" },
appearance = {
-- 'mono' (default) for 'Nerd Font Mono' or 'normal' for 'Nerd Font'
-- Adjusts spacing to ensure icons are aligned
nerd_font_variant = "mono",
},
-- (Default) Only show the documentation popup when manually triggered
completion = {
documentation = { auto_show = true },
list = {
selection = {
preselect = true,
auto_insert = false,
},
},
},
signature = { enabled = true },
sources = {
default = { "lazydev", "lsp", "path", "snippets", "buffer" },
providers = {
lazydev = {
name = "LazyDev",
module = "lazydev.integrations.blink",
score_offset = 100,
},
},
},
fuzzy = { implementation = "prefer_rust" },
})
end,
onUpdate = function()
vim.notify("Building blink.cmp", vim.log.levels.INFO)
require('blink.cmp').build():pwait()
end,
}

4
lua/plugins/boo.lua Normal file
View file

@ -0,0 +1,4 @@
return {
"LukasPietzschmann/boo.nvim",
opts = {},
}

53
lua/plugins/conformer.lua Normal file
View file

@ -0,0 +1,53 @@
return {
"stevearc/conform.nvim",
dependencies = { "frostplexx/mason-bridge.nvim" },
event = { "BufWritePre" },
cmd = { "ConformInfo" },
init = function()
require("conform").setup({
format_on_save = function(bufnr)
if vim.g.disable_autoformat or vim.b[bufnr].disable_autoformat then
return
end
require("conform").formatters_by_ft = require("mason-bridge").get_formatters()
return { timeout_ms = 200, lsp_fallback = true }, on_format
end,
formatters_by_ft = require("mason-bridge").get_formatters(), --[[ = {
lua = { "stylua" },
javascript = { "prettier" },
html = { "prettier" },
css = { "prettier" },
c = { "clang-format" },
cpp = { "clang-format" },
arduino = { "clang-format" },
sh = { "shfmt" },
bash = { "shfmt" },
mksh = { "shfmt" },
json = { "jq" },
}, ]] --
-- This will provide type hinting with LuaLS
---@module "conform"
---@type conform.setupOpts
formatters = {
prettier = {
prepend_args = { "--use-tabs", "true" },
},
jq = {
prepend_args = { "--tab" },
},
["clang-format"] = {
prepend_args = function(self, ctx)
return { "-style=file:/home/Dario48/.config/.clang-format" }
end,
},
default_format_opts = {
lsp_format = "fallback",
},
},
})
-- If you want the formatexpr, here is the place to set it
vim.o.formatexpr = "v:lua.require'conform'.formatexpr()"
vim.g.arduino_recommended_style = 0
end,
}

5
lua/plugins/cord.lua Normal file
View file

@ -0,0 +1,5 @@
return {
"vyfor/cord.nvim",
build = ":Cord update",
-- opts = {}
}

View file

@ -0,0 +1,4 @@
return {
url = "https://dario48.site/git/Dario48/darioline.git",
config = true,
}

Some files were not shown because too many files have changed in this diff Show more