summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris <[email protected]>2021-03-15 10:46:53 -0400
committerChris <[email protected]>2021-03-15 10:46:53 -0400
commit4ed47a3471fbf489c7426e0076746c02fbd8e83a (patch)
tree224ccfdd43e2f05edad4a070795afbc63b43d57f
parent4111b28ae89d04c171d9d252bf649f598aa6cbc2 (diff)
update comments
-rw-r--r--README.md1
-rw-r--r--lua/nv-kommentary/init.lua16
2 files changed, 3 insertions, 14 deletions
diff --git a/README.md b/README.md
index 2df3c686..6279f13c 100644
--- a/README.md
+++ b/README.md
@@ -27,7 +27,6 @@ sudo rm -r neovim
- add lots of lsp
- configure neogit
- configure git blame
-- prefer single line comments kommentary
- move language servers not installed with npm to neovim local share location
- react commenting
- add license
diff --git a/lua/nv-kommentary/init.lua b/lua/nv-kommentary/init.lua
index c64290ae..dea90f75 100644
--- a/lua/nv-kommentary/init.lua
+++ b/lua/nv-kommentary/init.lua
@@ -1,16 +1,6 @@
vim.g.kommentary_create_default_mappings = false
vim.api.nvim_set_keymap("n", "<leader>/", "<Plug>kommentary_line_default", {})
---vim.api.nvim_set_keymap("n", "<leader>c", "<Plug>kommentary_motion_default", {})
vim.api.nvim_set_keymap("v", "<leader>/", "<Plug>kommentary_visual_default", {})
---[[vim.cmd([[
-function! Comment()
- if (mode() == "n" )
- execute "Commentary"
- else
- execute "'<,'>Commentary"
- endif
- endfunction
-vnoremap <silent> <space>/ :call Comment()
-autocmd! BufRead,BufNewFile *.{jsx,jx,js} setlocal filetype=javascript.jsx
-autocmd FileType javascript.jsx setlocal commentstring={/*\ %s\ */}
-]]
+require('kommentary.config').configure_language("default", {
+ prefer_single_line_comments = true,
+})