add mason-lspconfig, osc52 copy

This commit is contained in:
Mira Kristipati 2024-07-02 20:14:45 -04:00
parent ba85f279ae
commit d1313ec362
4 changed files with 31 additions and 10 deletions

View file

@ -73,3 +73,15 @@ vim.o.foldlevelstart = 99
vim.opt.wildmode = { "list", "longest" } vim.opt.wildmode = { "list", "longest" }
vim.opt.wildmenu = true vim.opt.wildmenu = true
vim.opt.autoread = true vim.opt.autoread = true
vim.g.clipboard = {
name = "OSC 52",
copy = {
["+"] = require("vim.ui.clipboard.osc52").copy "+",
["*"] = require("vim.ui.clipboard.osc52").copy "*",
},
paste = {
["+"] = require("vim.ui.clipboard.osc52").paste "+",
["*"] = require("vim.ui.clipboard.osc52").paste "*",
},
}

View file

@ -1,8 +1,13 @@
local lspconfig = require "lspconfig" local lspconfig = require "lspconfig"
local on_attach = require("nvchad.configs.lspconfig").on_attach local on_attach = require("nvchad.configs.lspconfig").on_attach
local on_attach = require("nvchad.configs.lspconfig").on_init local on_attach = require("nvchad.configs.lspconfig").on_init
local capabilities = require("nvchad.configs.lspconfig").capabilities local capabilities
require("mason-lspconfig").setup()
require("mason-lspconfig").setup_handlers {
function(name)
lspconfig[name].setup {}
end,
}
-- if you just want default config for the servers then put them in a table -- if you just want default config for the servers then put them in a table
local servers = { local servers = {
"html", "html",
@ -14,11 +19,13 @@ local servers = {
"lua_ls", "lua_ls",
"docker_compose_language_service", "docker_compose_language_service",
"ast_grep", "ast_grep",
-- "basedpyright", "pyright",
"bashls", "bashls",
"css_variables", "css_variables",
"marksman", "marksman",
"rust_analyzer", "rust_analyzer",
"ruff",
"jdtls",
} }
for _, lsp in ipairs(servers) do for _, lsp in ipairs(servers) do

View file

@ -4,9 +4,9 @@ local opts = {
debug = true, debug = true,
sources = { sources = {
null_ls.builtins.code_actions.refactoring, null_ls.builtins.code_actions.refactoring,
null_ls.builtins.diagnostics.mypy.with { -- null_ls.builtins.diagnostics.mypy.with {
-- extra_args = { "--python-executable", virtual .. "/bin/python3" }, -- extra_args = { "--python-executable", virtual .. "/bin/python3" },
}, -- },
-- null_ls.builtins.diagnostics.flake8.with { -- null_ls.builtins.diagnostics.flake8.with {
-- extra_args = { "--select", "E,W,F", "--ignore", "E501,E402,E722,W503", "--max-line-length", "150" }, -- extra_args = { "--select", "E,W,F", "--ignore", "E501,E402,E722,W503", "--max-line-length", "150" },
-- }, -- },

View file

@ -7,6 +7,7 @@ return {
-- General Plugins -- -- General Plugins --
--------------------- ---------------------
-- LSP Stuff -- LSP Stuff
-- TODO: make these lang specific
{ {
"williamboman/mason.nvim", "williamboman/mason.nvim",
-- opts = overrides.mason -- opts = overrides.mason
@ -75,6 +76,7 @@ return {
end, -- Override to setup mason-lspconfig end, -- Override to setup mason-lspconfig
dependencies = { dependencies = {
"nvimdev/lspsaga.nvim", "nvimdev/lspsaga.nvim",
"williamboman/mason-lspconfig.nvim",
}, },
lazy = false, lazy = false,
}, },