From c492416220caa81dd2c91c33dab94d059313f114 Mon Sep 17 00:00:00 2001 From: Daylin Morgan Date: Wed, 20 Nov 2024 13:11:36 -0600 Subject: [PATCH] fix neovim issues --- home/private_dot_config/nvim/dot_gitignore | 8 ---- .../nvim/lua/config/lazy.lua | 26 +++++++++--- .../nvim/lua/plugins/builtins.lua | 19 --------- .../nvim/lua/plugins/language/python.lua | 40 +++++++++--------- .../nvim/lua/plugins/language/typst.lua | 16 +++++++ .../nvim/spell/en.utf-8.add.spl | Bin 0 -> 1166 bytes 6 files changed, 57 insertions(+), 52 deletions(-) delete mode 100644 home/private_dot_config/nvim/dot_gitignore create mode 100644 home/private_dot_config/nvim/lua/plugins/language/typst.lua create mode 100644 home/private_dot_config/nvim/spell/en.utf-8.add.spl diff --git a/home/private_dot_config/nvim/dot_gitignore b/home/private_dot_config/nvim/dot_gitignore deleted file mode 100644 index cc5457a..0000000 --- a/home/private_dot_config/nvim/dot_gitignore +++ /dev/null @@ -1,8 +0,0 @@ -tt.* -.tests -doc/tags -debug -.repro -foo.* -*.log -data diff --git a/home/private_dot_config/nvim/lua/config/lazy.lua b/home/private_dot_config/nvim/lua/config/lazy.lua index 65619da..0e2155f 100644 --- a/home/private_dot_config/nvim/lua/config/lazy.lua +++ b/home/private_dot_config/nvim/lua/config/lazy.lua @@ -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, diff --git a/home/private_dot_config/nvim/lua/plugins/builtins.lua b/home/private_dot_config/nvim/lua/plugins/builtins.lua index 4949761..cb89945 100644 --- a/home/private_dot_config/nvim/lua/plugins/builtins.lua +++ b/home/private_dot_config/nvim/lua/plugins/builtins.lua @@ -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", diff --git a/home/private_dot_config/nvim/lua/plugins/language/python.lua b/home/private_dot_config/nvim/lua/plugins/language/python.lua index 32886b4..6f43443 100644 --- a/home/private_dot_config/nvim/lua/plugins/language/python.lua +++ b/home/private_dot_config/nvim/lua/plugins/language/python.lua @@ -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 = { { "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, }, }, diff --git a/home/private_dot_config/nvim/lua/plugins/language/typst.lua b/home/private_dot_config/nvim/lua/plugins/language/typst.lua new file mode 100644 index 0000000..0f1cf37 --- /dev/null +++ b/home/private_dot_config/nvim/lua/plugins/language/typst.lua @@ -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. + }, + }, + }, + }, + }, +}) diff --git a/home/private_dot_config/nvim/spell/en.utf-8.add.spl b/home/private_dot_config/nvim/spell/en.utf-8.add.spl new file mode 100644 index 0000000000000000000000000000000000000000..f4e1167077bf3d39ed143b4c2c5cab70c9c32ef6 GIT binary patch literal 1166 zcmY*YyKdV+5WHOpaf%>i8hwD1)}=Z-gux)N5jcRM_C%gUMifaONm+80K3%@R|B=R@ zlJxqAWaf@B;No!Hxr)ry^z#KaiOm>gnbkG9aMXothGQ|GB zC$JXQ_mMJP#U?IVt!gMAz&bW0vDy*k8K1_lMp`whx`ej3ZOoF?Q&*xd@?n^4>m3My zPuQYTb~s*PKUt<7KvzRu5tIIOTC+74IfCH#4=8;FPX+)BjAhhe794n}<#(=b2mlVO z!Wn^!Oe_DK*U3GYsKui#tb=gcy}DBN((9@V;qc8z?EFr)sINoDs7cOR#-z12+_?it z#%VlKmJQXEF;VK(aU5kBIJ3p^ZbH^-#~f}Km|1|F zxoJ^0jPNLx84ftu>JvumNk1-CLl*RRlI1HvDT7-!b|=j+-ArAth6Qo)!F_B%8_0fe zr{Tfe@yGzdQiuMhd)(~n5cG~+obTDiB~->0(UTn@;Whj!Ca&yYacL?%BX%j2evAVN z4=OE;G27SYACv3b^@fu;mCrApv4M||=n4eSk7(xQS}v(?#?&0+<<|hDYaHY3?uF!w a*w@)!lN&@6c>a8U2{zw5{PqT-jQIykmfPL{ literal 0 HcmV?d00001