experimenting w/neovim and LSP

pull/2/head
Alpha Chen 2 years ago
parent 4a69aaf5bb
commit 5a666f9ed8

@ -0,0 +1,36 @@
(vim.cmd "colorscheme paramount")
;; clear background
(let [l [:Normal :htmlH1 :htmlH2 :htmlH3 :htmlH4 :htmlH5 :htmlH6]]
(each [_ v (ipairs l)]
(vim.cmd (.. "highlight " v " ctermbg=None"))))
(set vim.g.mapleader " ")
(vim.keymap.set :n "\\\\" ":write<cr>" {:noremap true})
(vim.keymap.set :i "\\\\" "<esc>:write<cr>" {:noremap true})
(vim.keymap.set :n "<leader>/" ":nohlsearch<cr>" opts)
(let [opts {:noremap true :silent true}]
(vim.keymap.set :n "<leader>e" vim.diagnostic.open_float opts)
(vim.keymap.set :n "[d" vim.diagnostic.goto_prev opts)
(vim.keymap.set :n "]d" vim.diagnostic.goto_next opts)
(vim.keymap.set :n "<leader>q" vim.diagnostic.setloclist opts))
(fn on_attach [client bufnr]
(vim.api.nvim_buf_set_option bufnr :omnifunc "v:lua.vim.lsp.omnifunc")
(let [bufopts {:noremap true :silent true :buffer bufnr}]
(vim.keymap.set :n "gD" vim.lsp.buf.declaration bufopts)
(vim.keymap.set :n "gd" vim.lsp.buf.definition bufopts)
(vim.keymap.set :n "K" vim.lsp.buf.hover bufopts)
(vim.keymap.set :n "gi" vim.lsp.buf.implementation bufopts)
(vim.keymap.set :n "<C-k>" vim.lsp.buf.signature_help bufopts)
(vim.keymap.set :n "<leader>wa" vim.lsp.buf.add_workspace_folder bufopts)
(vim.keymap.set :n "<leader>wr" vim.lsp.buf.remove_workspace_folder bufopts)
(vim.keymap.set :n "<leader>wl" (fn [] (print (vim.inspect (vim.lsp.buf.list_workspace_folders)))) bufopts)
(vim.keymap.set :n "<leader>D" vim.lsp.buf.type_definition bufopts)
(vim.keymap.set :n "<leader>rn" vim.lsp.buf.rename bufopts)
(vim.keymap.set :n "<leader>ca" vim.lsp.buf.code_action bufopts)
(vim.keymap.set :n "gr" vim.lsp.buf.references bufopts)
(vim.keymap.set :n "<leader>f" vim.lsp.buf.formatting bufopts)))

@ -0,0 +1,2 @@
require("hotpot")
require("init")

36
.gitmodules vendored

@ -129,3 +129,39 @@
[submodule "src/frink.alfredworkflow"]
path = src/frink.alfredworkflow
url = https://github.com/src/frink.alfredworkflow
[submodule ".local/share/nvim/site/pack/hotpot.nvim"]
path = .local/share/nvim/site/pack/kejadlen/start/hotpot
url = https://github.com/rktjmp/hotpot.nvim
[submodule ".local/share/nvim/site/pack/kejadlen/start/colorscheme-paramount"]
path = .local/share/nvim/site/pack/kejadlen/start/colorscheme-paramount
url = https://github.com/owickstrom/vim-colors-paramount.git
[submodule ".local/share/nvim/site/pack/kejadlen/start/vim-tmux-navigator"]
path = .local/share/nvim/site/pack/kejadlen/start/tmux-navigator
url = https://github.com/christoomey/vim-tmux-navigator.git
[submodule ".local/share/nvim/site/pack/kejadlen/start/lightline"]
path = .local/share/nvim/site/pack/kejadlen/start/lightline
url = https://github.com/itchyny/lightline.vim.git
[submodule ".local/share/nvim/site/pack/kejadlen/start/unimpaired"]
path = .local/share/nvim/site/pack/kejadlen/start/unimpaired
url = https://github.com/tpope/vim-unimpaired.git
[submodule ".local/share/nvim/site/pack/kejadlen/start/sleuth"]
path = .local/share/nvim/site/pack/kejadlen/start/sleuth
url = https://github.com/tpope/vim-sleuth.git
[submodule ".local/share/nvim/site/pack/kejadlen/start/fennel"]
path = .local/share/nvim/site/pack/kejadlen/start/fennel
url = https://github.com/jaawerth/fennel.vim.git
[submodule ".local/share/nvim/site/pack/kejadlen/start/commentary"]
path = .local/share/nvim/site/pack/kejadlen/start/commentary
url = https://github.com/tpope/vim-commentary.git
[submodule ".local/share/nvim/site/pack/kejadlen/start/lspconfig"]
path = .local/share/nvim/site/pack/kejadlen/start/lspconfig
url = https://github.com/neovim/nvim-lspconfig.git
[submodule ".local/share/nvim/site/pack/kejadlen/start/sensible"]
path = .local/share/nvim/site/pack/kejadlen/start/sensible
url = https://github.com/tpope/vim-sensible.git
[submodule ".local/share/nvim/site/pack/kejadlen/start/vinegar"]
path = .local/share/nvim/site/pack/kejadlen/start/vinegar
url = https://github.com/tpope/vim-vinegar.git
[submodule ".local/share/nvim/site/pack/kejadlen/start/surround"]
path = .local/share/nvim/site/pack/kejadlen/start/surround
url = https://github.com/tpope/vim-surround.git

@ -0,0 +1 @@
Subproject commit a5601d36fb6932e8d1a6f8b37b179a99b1456798

@ -0,0 +1 @@
Subproject commit 3654775824337f466109f00eaf6759760f65be34

@ -0,0 +1 @@
Subproject commit b3020a4bb7065595840a7c123c9a298eb5f794d7

@ -0,0 +1 @@
Subproject commit 104aa65f9155d34629c9623d5dac39b5b2ad555c

@ -0,0 +1 @@
Subproject commit b02ef0d9f253dfc1cbb3f340b74998d7a4db0bf6

@ -0,0 +1 @@
Subproject commit c107a0f33e7af39dd48ad0e681c3d65281b812d1

@ -0,0 +1 @@
Subproject commit 226203be173bf0b95ee2a5cb6575ae604b3f9f7a

@ -0,0 +1 @@
Subproject commit 1d25e8e5dc4062e38cab1a461934ee5e9d59e5a8

@ -0,0 +1 @@
Subproject commit bf3480dc9ae7bea34c78fbba4c65b4548b5b1fea

@ -0,0 +1 @@
Subproject commit 9ca5bfe5bd274051b5dd796cc150348afc993b80

@ -0,0 +1 @@
Subproject commit efdc6475f7ea789346716dabf9900ac04ee8604a

@ -0,0 +1 @@
Subproject commit bb1bcddf43cfebe05eb565a84ab069b357d0b3d6
Loading…
Cancel
Save