fix neovim issues

This commit is contained in:
Daylin Morgan 2024-11-20 13:11:36 -06:00
parent 813283badf
commit c492416220
Signed by: daylin
GPG key ID: 950D13E9719334AD
6 changed files with 57 additions and 52 deletions

View file

@ -1,8 +0,0 @@
tt.*
.tests
doc/tags
debug
.repro
foo.*
*.log
data

View file

@ -19,12 +19,28 @@ require("lazy").setup({
-- add LazyVim and import its plugins -- add LazyVim and import its plugins
{ "LazyVim/LazyVim", import = "lazyvim.plugins" }, { "LazyVim/LazyVim", import = "lazyvim.plugins" },
-- import/override with your plugins -- import/override with your plugins
{ import = "lazyvim.plugins.extras.ui.edgy" },
{ import = "lazyvim.plugins.extras.lang.docker" }, { import = "lazyvim.plugins.extras.lang.docker" },
-- { import = "lazyvim.plugins.extras.lang.markdown" }, -- { import = "plugins" },
-- { import = "lazyvim.plugins.extras.lsp.none-ls" }, { import = "plugins.builtins" },
{ import = "plugins" }, { import = "plugins.disabled" },
{ import = "plugins.language" }, { import = "plugins.host" },
{ import = "plugins.ui" },
-- { import = "plugins.language" },
{ import = "plugins.language.go" },
{ import = "plugins.language.lua" },
{ import = "plugins.language.markdown" },
{ import = "plugins.language.misc" },
{ import = "plugins.language.nim" },
{ import = "plugins.language.nix" },
{ import = "plugins.language.nu" },
{ import = "plugins.language.python" },
-- { import = "plugins.language.roc" },
{ import = "plugins.language.rust" },
{ import = "plugins.language.shell" },
{ import = "plugins.language.tex" },
{ import = "plugins.language.typst" },
-- { import = "plugins.language.zig" },
--
}, },
rocks = { rocks = {
enabled = false, enabled = false,

View file

@ -8,25 +8,6 @@ return {
}, },
{ {
"folke/noice.nvim", "folke/noice.nvim",
-- opts = {
-- presets = {
-- command_palette = false,
-- },
-- https://github.com/folke/noice.nvim/wiki/Configuration-Recipes#ignore-certain-lsp-servers-for-progress-messages
-- routes = {
-- {
-- filter = {
-- event = "lsp",
-- kind = "msg_show";
-- cond = function(message)
-- local client = vim.tbl_get(message.opts, "progress", "client")
-- return client == "nim_langserver"
-- end,
-- },
-- opts = { skip = true },
-- },
-- },
-- },
}, },
{ {
"nvim-treesitter/nvim-treesitter", "nvim-treesitter/nvim-treesitter",

View file

@ -1,37 +1,37 @@
-- adapted from https://www.lazyvim.org/extras/lang/python#nvim-lspconfig
local lsp = vim.g.lazyvim_python_lsp or "pyright"
local ruff = vim.g.lazyvim_python_ruff or "ruff"
return { return {
require("util").setup_lang({ treesitter = { "python", "toml" }, mason = { "ruff", "ruff-lsp" } }), require("util").setup_lang({ treesitter = { "python", "toml" }, mason = { "ruff" } }),
-- modified from https://www.lazyvim.org/extras/lang/python#nvim-lspconfig
{ {
"neovim/nvim-lspconfig", "neovim/nvim-lspconfig",
opts = { opts = {
-- autoformat = false,
servers = { servers = {
ruff_lsp = { pyright = { enabled = true },
ruff = {
enabled = true,
cmd_env = { RUFF_TRACE = "messages" },
init_options = {
settings = {
logLevel = "error",
},
},
keys = { keys = {
{ {
"<leader>co", "<leader>co",
function() LazyVim.lsp.action["source.organizeImports"],
vim.lsp.buf.code_action({
apply = true,
context = {
only = { "source.organizeImports" },
diagnostics = {},
},
})
end,
desc = "Organize Imports", desc = "Organize Imports",
}, },
}, },
}, },
}, },
setup = { setup = {
ruff_lsp = function() [ruff] = function()
require("lazyvim.util").lsp.on_attach(function(client, _) LazyVim.lsp.on_attach(function(client, _)
if client.name == "ruff_lsp" then
-- Disable hover in favor of Pyright -- Disable hover in favor of Pyright
client.server_capabilities.hoverProvider = false client.server_capabilities.hoverProvider = false
end end, ruff)
end)
end, end,
}, },
}, },

View file

@ -0,0 +1,16 @@
return require("util").if_exe("typst", {
{
"neovim/nvim-lspconfig",
opts = {
servers = {
typst_lsp = {
mason = false,
settings = {
exportPdf = "never", -- Choose onType, onSave or never.
-- serverPath = "" -- Normally, there is no need to uncomment it.
},
},
},
},
},
})

Binary file not shown.