From cdd9b2f6987ea8f77295ce6d3c32ffcabb8a2793 Mon Sep 17 00:00:00 2001 From: elkowar <5300871+elkowar@users.noreply.github.com> Date: Tue, 3 Aug 2021 20:18:47 +0200 Subject: [PATCH] Some vim stuff --- nvim/.config/nvim/fnl/dots/keybinds.fnl | 5 ++++- nvim/.config/nvim/fnl/dots/plugins.fnl | 20 ++++++++++++++----- nvim/.config/nvim/fnl/dots/plugins/lsp.fnl | 13 ++++++++++++ nvim/.config/nvim/fnl/dots/plugins/neogit.fnl | 6 ++++++ .../nvim/fnl/dots/plugins/telescope.fnl | 1 + 5 files changed, 39 insertions(+), 6 deletions(-) create mode 100644 nvim/.config/nvim/fnl/dots/plugins/neogit.fnl diff --git a/nvim/.config/nvim/fnl/dots/keybinds.fnl b/nvim/.config/nvim/fnl/dots/keybinds.fnl index eba4f12..1321410 100644 --- a/nvim/.config/nvim/fnl/dots/keybinds.fnl +++ b/nvim/.config/nvim/fnl/dots/keybinds.fnl @@ -42,6 +42,7 @@ "p" (cmd "Telescope find_files" "Open file-browser") ":" (cmd "Telescope commands" "Search command with fzf") "s" (cmd "w" "Save file") + "g" (cmd "Neogit" "Git") "m" {:name "+Code actions" "d" (cmd "Lspsaga hover_doc" "Show documentation") @@ -75,13 +76,15 @@ "n" (cmd "set relativenumber!" "toggle relative numbers") "m" (cmd "set nonumber! norelativenumber" "toggle numbers") "g" (cmd "Goyo | set linebreak" "toggle focus mode") - "i" (cmd "IndentGuidesToggle" "toggle indent guides")} + "i" (cmd "IndentGuidesToggle" "toggle indent guides") + "s" (cmd "VSSplit" "keep selection visible in split")} "b" {:name "+buffers" "b" (cmd "Buffers" "select open buffer") "c" (cmd "bdelete!" "close open buffer") "w" (cmd "bwipeout!" "wipeout open buffer")}} + {:prefix ""}) (wk.register diff --git a/nvim/.config/nvim/fnl/dots/plugins.fnl b/nvim/.config/nvim/fnl/dots/plugins.fnl index cccb50f..5d4c0b2 100644 --- a/nvim/.config/nvim/fnl/dots/plugins.fnl +++ b/nvim/.config/nvim/fnl/dots/plugins.fnl @@ -3,9 +3,15 @@ (packer-use "/home/leon/coding/projects/nvim-gehzu" {} + "/home/leon/coding/projects/yuck.vim" {} :elkowar/antifennel-nvim {:config #(set vim.g.antifennel_executable "/home/leon/tmp/antifennel/antifennel")} :elkowar/kmonad.vim {} + :rhysd/conflict-marker.vim {} + :wellle/visual-split.vim {} + :sindrets/diffview.nvim {} + :TimUntersberger/neogit {:mod "dots.plugins.neogit" + :cmd ["Neogit"]} :lifepillar/vim-gruvbox8 {:opt false :config #(do (set vim.g.gruvbox_italics 0) @@ -89,11 +95,14 @@ :iamcco/markdown-preview.nvim {:run vim.fn.mkdp#util#install} - ;:mfussenegger/nvim-dap {:opt true + :rcarriga/nvim-dap-ui {:opt false + :config #((. (require :dapui) :setup)) + :requires [:mfussenegger/nvim-dap]} + :mfussenegger/nvim-dap {:opt false} ;:mod "dots.plugins.nvim-dap"} - ;:nvim-telescope/telescope-dap.nvim {:opt true - ;:requires [:mfussenegger/nvim-dap - ;:nvim-telescope/telescope.nvim]} + :nvim-telescope/telescope-dap.nvim {:opt false + :requires [:mfussenegger/nvim-dap + :nvim-telescope/telescope.nvim]} ; code-related ----------------------------------------- <<< @@ -159,7 +168,8 @@ :requires ["mattn/webapi-vim"] :config #(do (set vim.g.rustfmt_fail_silently 1))} - :simrat39/rust-tools.nvim {} + :simrat39/rust-tools.nvim {:requires ["nvim-lua/popup.nvim" "nvim-lua/plenary.nvim"]} + :qnighy/lalrpop.vim {} :edwinb/idris2-vim {:ft ["idris2"]} diff --git a/nvim/.config/nvim/fnl/dots/plugins/lsp.fnl b/nvim/.config/nvim/fnl/dots/plugins/lsp.fnl index a767ccd..220c423 100644 --- a/nvim/.config/nvim/fnl/dots/plugins/lsp.fnl +++ b/nvim/.config/nvim/fnl/dots/plugins/lsp.fnl @@ -68,7 +68,20 @@ (init-lsp :svelte) ;(init-lsp :clangd) ;(init-lsp :ccls) + + +(when (not lsp.ewwls) + (set lsp-configs.ewwls + {:default_config {:cmd [ "/home/leon/coding/projects/ls-eww/crates/ewwls/target/debug/ewwls"] + :filetypes ["yuck"] + :root_dir (fn [fname] (or (lsp.util.find_git_ancestor fname) (vim.loop.os_homedir))) + :settings {}}})) + +(init-lsp :ewwls) + + (init-lsp :cssls {:filestypes ["css" "scss" "less" "stylus"] + :root_dir (lsp.util.root_pattern ["package.json" ".git"]) :settings {:css {:validate true} :less {:validate true} :scss {:validate true}}}) diff --git a/nvim/.config/nvim/fnl/dots/plugins/neogit.fnl b/nvim/.config/nvim/fnl/dots/plugins/neogit.fnl new file mode 100644 index 0000000..edc2746 --- /dev/null +++ b/nvim/.config/nvim/fnl/dots/plugins/neogit.fnl @@ -0,0 +1,6 @@ +(module dots.plugins.neogit + {autoload {a aniseed.core + neogit neogit}}) + +(neogit.setup + {:integrations {:diffview true}}) diff --git a/nvim/.config/nvim/fnl/dots/plugins/telescope.fnl b/nvim/.config/nvim/fnl/dots/plugins/telescope.fnl index fdb4889..bc926b9 100644 --- a/nvim/.config/nvim/fnl/dots/plugins/telescope.fnl +++ b/nvim/.config/nvim/fnl/dots/plugins/telescope.fnl @@ -9,5 +9,6 @@ :extensions {:frecency {:persistent_filter false}}}) (telescope.load_extension "frecency") +(telescope.load_extension "dap") (utils.keymap :n : ":Telescope find_files")