From 25a32e72d63039c3ef1253f4ef950565f231c3dd Mon Sep 17 00:00:00 2001 From: sgoudham Date: Wed, 7 Dec 2022 23:50:39 +0000 Subject: [PATCH] update lvim stuffs --- dot_config/lvim/config.lua | 5 +++- dot_config/lvim/lua/user/haskell.lua | 43 ---------------------------- 2 files changed, 4 insertions(+), 44 deletions(-) delete mode 100644 dot_config/lvim/lua/user/haskell.lua diff --git a/dot_config/lvim/config.lua b/dot_config/lvim/config.lua index c09c447..a47b853 100644 --- a/dot_config/lvim/config.lua +++ b/dot_config/lvim/config.lua @@ -78,6 +78,7 @@ lvim.builtin.which_key.mappings["f"] = { c = { "Telescope current_buffer_fuzzy_find", "Find Text In Current Buffer" }, C = { "Telescope commands", "Find Commands" }, r = { "Telescope oldfiles", "Open Recent File" }, + p = { "Telescope projects", "Open Projects" }, } local _, actions = pcall(require, "telescope.actions") @@ -141,7 +142,8 @@ lvim.builtin.treesitter.ensure_installed = { "markdown_inline", "html", "go", - "erlang" + "erlang", + "toml" } require("lspconfig.ui.windows").default_options.border = "rounded" @@ -208,6 +210,7 @@ require("lvim.lsp.manager").setup("hls", opts) -- Additional Plugins lvim.plugins = { + { "andweeb/presence.nvim" }, { "hrsh7th/cmp-cmdline" }, { "gpanders/editorconfig.nvim" }, { "p00f/nvim-ts-rainbow" }, diff --git a/dot_config/lvim/lua/user/haskell.lua b/dot_config/lvim/lua/user/haskell.lua deleted file mode 100644 index c25a5f9..0000000 --- a/dot_config/lvim/lua/user/haskell.lua +++ /dev/null @@ -1,43 +0,0 @@ --- vim.api.nvim_create_autocmd("BufWritePost", --- { --- group = vim.api.nvim_create_augroup("haskell", { clear = true }), --- pattern = "*.hs", --- desc = "Automatically output " --- callback = function() --- } --- ) - -local M = {} - -M.haskell_buf = nil - -local append_data = function(_, data) - if data then - vim.api.nvim_buf_set_lines(M.haskell_buf, -1, -1, false, data) - end -end - -function M:run_haskell() - local path_to_file = vim.fn.expand("%:p") - - if M.haskell_buf == nil then - vim.cmd [[vsplit]] - vim.cmd [[enew]] - M.haskell_buf = vim.api.nvim_get_current_buf() - - vim.api.nvim_buf_attach(M.haskell_buf, false, { - on_detach = function() - M.haskell_buf = nil - end - }) - end - - vim.api.nvim_buf_set_lines(M.haskell_buf, 0, -1, false, { "---- RESULTS ----" }) - vim.fn.jobstart("runhaskell " .. path_to_file, { - stdout_buffered = true, - on_stdout = append_data, - on_stderr = append_data - }) -end - -return M