diff --git a/after/ftplugin/cabal.lua b/after/ftplugin/cabal.lua new file mode 100644 index 0000000..5fffa3d --- /dev/null +++ b/after/ftplugin/cabal.lua @@ -0,0 +1,8 @@ +local conf = vim.lsp.config.hls +vim.lsp.config("hls", conf) +vim.lsp.enable("hls") + +vim.o.tabstop = 2 +vim.o.softtabstop = 0 +vim.o.shiftwidth = 0 +vim.o.expandtab = true diff --git a/after/ftplugin/lhaskell.lua b/after/ftplugin/lhaskell.lua new file mode 100644 index 0000000..5fffa3d --- /dev/null +++ b/after/ftplugin/lhaskell.lua @@ -0,0 +1,8 @@ +local conf = vim.lsp.config.hls +vim.lsp.config("hls", conf) +vim.lsp.enable("hls") + +vim.o.tabstop = 2 +vim.o.softtabstop = 0 +vim.o.shiftwidth = 0 +vim.o.expandtab = true diff --git a/after/ftplugin/nix.lua b/after/ftplugin/nix.lua new file mode 100644 index 0000000..8f09f75 --- /dev/null +++ b/after/ftplugin/nix.lua @@ -0,0 +1,3 @@ +vim.opt.expandtab = true -- expand tab input with spaces characters +vim.opt.tabstop = 2 -- num of space characters per tab +vim.opt.shiftwidth = 2 -- spaces per indentation level diff --git a/init.lua b/init.lua index 3b6dc97..cf3636f 100644 --- a/init.lua +++ b/init.lua @@ -1,3 +1,4 @@ require("config.lazy") require("config.general") require("config.autocmd") +require("config.lsp") diff --git a/lsp/ocamllsp.lua b/lsp/ocamllsp.lua new file mode 100644 index 0000000..529ff51 --- /dev/null +++ b/lsp/ocamllsp.lua @@ -0,0 +1,17 @@ +return { + cmd = { "ocamllsp" }, + filetypes = { + "ocaml", + "ocaml.interface", + "ocaml.menhir", + "ocaml.ocamllex", + "dune", + "reason", + }, + root_markers = { + { "dune-project", "dune-workspace" }, + { "*.opam", "esy.json", "package.json" }, + ".git", + }, + settings = {}, +} diff --git a/lua/config/general.lua b/lua/config/general.lua index 5b892b8..e0289f8 100644 --- a/lua/config/general.lua +++ b/lua/config/general.lua @@ -1,6 +1,8 @@ vim.opt.tabstop = 4 vim.opt.softtabstop = 0 vim.opt.shiftwidth = 0 +vim.opt.smartindent = true + vim.opt.shell = "/bin/bash" vim.opt.linebreak = true vim.cmd("set wrap smoothscroll") @@ -11,6 +13,8 @@ vim.opt.nu = true vim.cmd([[set listchars=eol:$,tab:>-,trail:~,extends:>,precedes:<,space:•]]) vim.keymap.set("n", "hc", ":set list!", { silent = true }) +vim.keymap.set("t", "", "", {}) + vim.keymap.set("n", ".", ":", {}) vim.keymap.set("i", "jk", "", {}) diff --git a/lua/config/lsp.lua b/lua/config/lsp.lua index 374d1e0..2bcdf85 100644 --- a/lua/config/lsp.lua +++ b/lua/config/lsp.lua @@ -1,2 +1,11 @@ -- lsp that are not on mason/beta branch lsp vim.lsp.enable("zls") +vim.lsp.enable("ocamllsp") +vim.lsp.enable("ocamllsp") +vim.lsp.enable("clojure_lsp") +vim.lsp.enable("uiua") + +vim.lsp.config("llvm-ir-lsp", { + cmd = { "llvm-ir-lsp" }, + filetypes = { "llvm" }, +}) diff --git a/lua/plugins/ansi.lua b/lua/plugins/ansi.lua new file mode 100644 index 0000000..df6671b --- /dev/null +++ b/lua/plugins/ansi.lua @@ -0,0 +1,8 @@ +return { + "0xferrous/ansi.nvim", + config = true, + opts = { + auto_enable = false, -- Auto-enable for configured filetypes + filetypes = { "log", "ansi" }, -- Filetypes to auto-enable + }, +} diff --git a/lua/plugins/image.lua b/lua/plugins/image.lua index 37c5a39..613e9e8 100644 --- a/lua/plugins/image.lua +++ b/lua/plugins/image.lua @@ -1,4 +1,17 @@ return { "3rd/image.nvim", - opts = {}, + opts = { + integrations = { + markdown = { + enabled = true, + clear_in_insert_mode = false, + download_remote_images = true, + only_render_image_at_cursor = false, + only_render_image_at_cursor_mode = "popup", -- or "inline" + floating_windows = true, -- if true, images will be rendered in floating markdown windows + filetypes = { "markdown", "vimwiki", "latex" }, -- markdown extensions (ie. quarto) can go here + }, + }, + }, + config = true, } diff --git a/lua/plugins/mason.lua b/lua/plugins/mason.lua index 2f05d54..9f3559b 100644 --- a/lua/plugins/mason.lua +++ b/lua/plugins/mason.lua @@ -60,7 +60,6 @@ return { }, }, }) - vim.lsp.enable("lua_ls") end, }, }, diff --git a/lua/plugins/peg.lua b/lua/plugins/peg.lua new file mode 100644 index 0000000..be7ea2f --- /dev/null +++ b/lua/plugins/peg.lua @@ -0,0 +1,4 @@ +return { + "taeber/vim-peg", + lazy = false, +} diff --git a/lua/plugins/uiua.lua b/lua/plugins/uiua.lua new file mode 100644 index 0000000..e962e49 --- /dev/null +++ b/lua/plugins/uiua.lua @@ -0,0 +1,3 @@ +return { + "Apeiros-46B/uiua.vim", +} diff --git a/lua/plugins/vimtex.lua b/lua/plugins/vimtex.lua new file mode 100644 index 0000000..b9fef9e --- /dev/null +++ b/lua/plugins/vimtex.lua @@ -0,0 +1,9 @@ +return { + "lervag/vimtex", + init = function() + -- VimTeX configuration goes here, e.g. + vim.g.vimtex_view_method = "mupdf" + vim.g.vimtex_compiler_method = "latexmk" + vim.g.vimtex_compiler_latexmk = { options = { "-shell-escape" } } + end, +}