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 0000000..f4e1167 Binary files /dev/null and b/home/private_dot_config/nvim/spell/en.utf-8.add.spl differ