2024-03-16 05:39:18 +00:00
|
|
|
;; FIXME: This belongs in personalize.fnl It's also here because it fixes a bug with racket filetypes...
|
|
|
|
(set vim.g.sexp_filetypes "racket,fennel,scheme,lisp")
|
2024-03-06 22:47:10 +00:00
|
|
|
|
|
|
|
(let [lazy (require :lazy)]
|
|
|
|
(lazy.setup ["https://github.com/rktjmp/hotpot.nvim"
|
2024-03-16 05:39:18 +00:00
|
|
|
"https://github.com/tpope/vim-sexp-mappings-for-regular-people"
|
|
|
|
"https://github.com/guns/vim-sexp"
|
|
|
|
"https://github.com/benknoble/vim-racket"
|
|
|
|
"https://github.com/preservim/vim-markdown"
|
|
|
|
{:url "https://github.com/epwalsh/obsidian.nvim"
|
|
|
|
:version "v3.7.1"}
|
|
|
|
"https://github.com/nvim-lua/plenary.nvim"
|
2024-03-06 22:47:10 +00:00
|
|
|
{:url "https://github.com/nvim-treesitter/nvim-treesitter"
|
2024-03-09 18:58:26 +00:00
|
|
|
:build ":TSUpdate"}
|
2024-03-06 23:19:13 +00:00
|
|
|
{:url "https://github.com/neovim/nvim-lspconfig"
|
2024-03-09 18:58:26 +00:00
|
|
|
:dependencies ["https://github.com/williamboman/mason.nvim"
|
|
|
|
:williamboman/mason-lspconfig.nvim
|
|
|
|
{:url "https://github.com/j-hui/fidget.nvim"
|
|
|
|
:tag :legacy
|
|
|
|
:opts {}}
|
|
|
|
"https://github.com/folke/neodev.nvim"]}
|
2024-03-06 23:19:13 +00:00
|
|
|
{:url "https://github.com/hrsh7th/nvim-cmp"
|
2024-03-09 18:58:26 +00:00
|
|
|
:dependencies ["https://github.com/hrsh7th/cmp-nvim-lsp"
|
|
|
|
"https://github.com/hrsh7th/cmp-buffer"
|
|
|
|
"https://github.com/hrsh7th/cmp-path"
|
|
|
|
"https://github.com/hrsh7th/cmp-cmdline"
|
|
|
|
"https://github.com/hrsh7th/cmp-cmdline"]}
|
2024-03-06 23:19:13 +00:00
|
|
|
{:url "https://github.com/L3MON4D3/LuaSnip"
|
2024-03-09 18:58:26 +00:00
|
|
|
:dependencies ["https://github.com/saadparwaiz1/cmp_luasnip"
|
|
|
|
"https://github.com/rafamadriz/friendly-snippets"]}
|
2024-03-06 23:19:13 +00:00
|
|
|
{:url "https://github.com/nvim-telescope/telescope.nvim"
|
2024-03-09 18:58:26 +00:00
|
|
|
:tag :0.1.2
|
|
|
|
:dependencies [{:url "https://github.com/nvim-telescope/telescope-fzf-native.nvim"
|
2024-03-16 05:39:18 +00:00
|
|
|
:build (.. "cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release"
|
|
|
|
" && cmake --build build --config Release"
|
|
|
|
" && cmake --install build --prefix build")}
|
|
|
|
"https://github.com/xiyaowong/telescope-emoji.nvim"]}
|
2024-03-09 18:58:26 +00:00
|
|
|
"https://github.com/tamton-aquib/duck.nvim"]))
|
|
|
|
|
2024-03-16 05:39:18 +00:00
|
|
|
;; NOTE: If a value could be considered a preference or is subjective
|
|
|
|
;; then it should be defined in personalize.fnl
|
|
|
|
;; Otherwise packaging details and less malleable values, by nature or desire, belong below...
|
2024-03-06 22:47:10 +00:00
|
|
|
|
|
|
|
(let [personalize (require :personalize)]
|
|
|
|
(personalize.options)
|
|
|
|
(personalize.keymap))
|
|
|
|
|
|
|
|
(let [telescope (require :telescope)]
|
2024-03-09 22:32:47 +00:00
|
|
|
(pcall (telescope.load_extension :fzf))
|
2024-03-06 22:47:10 +00:00
|
|
|
(pcall (telescope.load_extension :emoji)))
|
|
|
|
|
2024-03-16 05:39:18 +00:00
|
|
|
(let [cmp (require :cmp)
|
|
|
|
luasnip (require :luasnip)
|
|
|
|
vscode-snips (require :luasnip.loaders.from_vscode)
|
|
|
|
{: cmp-mapping} (require :personalize)]
|
|
|
|
(vscode-snips.lazy_load)
|
|
|
|
(luasnip.config.setup)
|
|
|
|
(cmp.setup {:snippet {:expand #(luasnip $1)}
|
|
|
|
:mapping (cmp.mapping.preset.insert cmp-mapping)
|
|
|
|
:sources (cmp.config.sources [{:name :nvim_lsp}
|
|
|
|
{:name :luasnip}
|
|
|
|
{:name :buffer}])})
|
|
|
|
(cmp.setup.cmdline ["/" "?"]
|
|
|
|
{:mapping (cmp.mapping.preset.cmdline)
|
|
|
|
:sources [{:name :buffer}]})
|
|
|
|
(cmp.setup.cmdline [":"]
|
|
|
|
{:mapping (cmp.mapping.preset.cmdline)
|
|
|
|
:sources (cmp.config.sources [{:name :path}
|
|
|
|
{:name :cmdline}])})
|
|
|
|
(cmp.setup.filetype [:gitcommit]
|
|
|
|
{:mapping (cmp.mapping.preset.cmdline)
|
|
|
|
:sources (cmp.config.sources [{:name :git}
|
|
|
|
{:name :buffer}])}))
|
|
|
|
|
|
|
|
(let [obsidian (require :obsidian)
|
|
|
|
personalize (require :personalize)]
|
|
|
|
(obsidian.setup personalize.obsidian))
|
|
|
|
|
|
|
|
(let [treesitter (require :nvim-treesitter.configs)
|
|
|
|
{: treesitter-languages} (require :personalize)]
|
|
|
|
(treesitter.setup {:ensure_installed treesitter-languages
|
|
|
|
:sync_install false
|
|
|
|
:auto_install true
|
|
|
|
:highlight {:enable true}
|
|
|
|
:indent {:enable true}}))
|
|
|
|
|
|
|
|
(let [neodev (require :neodev)
|
|
|
|
mason (require :mason)
|
|
|
|
mason-lspconfig (require :mason-lspconfig)
|
|
|
|
{: language-servers : lsp-attach} (require :personalize)]
|
|
|
|
(neodev.setup)
|
|
|
|
(mason.setup)
|
|
|
|
(mason-lspconfig.setup {:ensure_installed (vim.tbl_keys language-servers)})
|
|
|
|
(mason-lspconfig.setup_handlers
|
|
|
|
[(fn [server_name]
|
|
|
|
(let [server (. (require :lspconfig)
|
|
|
|
server_name)
|
|
|
|
cmp-nvim-lsp (require :cmp_nvim_lsp)
|
|
|
|
settings (. language-servers
|
|
|
|
server_name)]
|
|
|
|
(server.setup {:capabilities (cmp-nvim-lsp.default_capabilities (vim.lsp.protocol.make_client_capabilities))
|
|
|
|
:on_attach lsp-attach
|
|
|
|
: settings
|
|
|
|
:filetypes (or settings.filetypes
|
|
|
|
[])})))]))
|