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
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
-- import/override with your plugins
{ import = "lazyvim.plugins.extras.ui.edgy" },
{ import = "lazyvim.plugins.extras.lang.docker" },
-- { import = "lazyvim.plugins.extras.lang.markdown" },
-- { import = "lazyvim.plugins.extras.lsp.none-ls" },
{ import = "plugins" },
{ import = "plugins.language" },
-- { import = "plugins" },
{ import = "plugins.builtins" },
{ import = "plugins.disabled" },
{ 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 = {
enabled = false,

View file

@ -8,25 +8,6 @@ return {
},
{
"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",

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