more!!! add python support and formatters and null ls to manage all...
that automatically also change my stylua.toml to ignore everything cause I don't like the way it formats stuff
This commit is contained in:
@ -1,12 +1,16 @@
|
||||
-- inspired by (and partially yoinked from): github.com/gonstoll/dotfiles
|
||||
|
||||
local M = {
|
||||
misc = require("core.misc"),
|
||||
folding = require("core.folding"),
|
||||
lsp = require("core.lsp"),
|
||||
color = require("core.color"),
|
||||
snippets = vim.fs.joinpath(vim.fn.stdpath("config"), "lua/core/snippets.lua"),
|
||||
}
|
||||
local notify = vim.notify
|
||||
--- overidden version of vim.notify
|
||||
---@param msg string message
|
||||
---@param level vim.log.levels? log level
|
||||
---@param opts table? options
|
||||
---@diagnostic disable-next-line: duplicate-set-field
|
||||
vim.notify = function(msg, level, opts)
|
||||
notify(msg, level or vim.log.levels.INFO, opts or {
|
||||
title = require("core.misc").appid
|
||||
})
|
||||
end
|
||||
|
||||
--- check if the given table contains an item, and return the key value pair if
|
||||
--- it does
|
||||
@ -23,6 +27,14 @@ table.contains = function(self, item)
|
||||
return false
|
||||
end
|
||||
|
||||
local M = {
|
||||
misc = require("core.misc"),
|
||||
folding = require("core.folding"),
|
||||
lsp = require("core.lsp"),
|
||||
color = require("core.color"),
|
||||
snippets = vim.fs.joinpath(vim.fn.stdpath("config"), "lua/core/snippets.lua"),
|
||||
}
|
||||
|
||||
M.mason = {
|
||||
--- Gets a path to a package in the Mason registry.
|
||||
--- Prefer this to `get_package`, since the package might not always be
|
||||
@ -30,9 +42,11 @@ M.mason = {
|
||||
---@param pkg string
|
||||
---@param path? string
|
||||
get_pkg_path = function(pkg, path)
|
||||
pcall(require, "mason") -- make sure Mason is loaded. Will fail when generating docs
|
||||
pcall(require, "mason") -- make sure Mason is loaded. Will fail when
|
||||
-- generating docs
|
||||
|
||||
local root = vim.env.MASON or vim.fs.joinpath(vim.fn.stdpath("data"), "mason")
|
||||
local root = vim.env.MASON or vim.fs.joinpath(vim.fn.stdpath("data"),
|
||||
"mason")
|
||||
path = path or ""
|
||||
return vim.fs.joinpath(root, "packages", pkg, path)
|
||||
end
|
||||
|
Reference in New Issue
Block a user