summaryrefslogtreecommitdiff
path: root/after
diff options
context:
space:
mode:
authorRaymaekers Luca <raymaekers.luca@gmail.com>2024-09-14 19:48:38 +0200
committerRaymaekers Luca <raymaekers.luca@gmail.com>2024-09-14 20:05:12 +0200
commit7dcd592eae886dc8edde2dc65d6e6323201a2aaf (patch)
tree8c792984bd55d710dd409bcc90d450e2e90a58ce /after
parent6081f67ec9f5032fcd9d4453a2646ca033364615 (diff)
checkpoint
- changed installation of tmux-navigator - removed init.lua file in user/ directory - added autocmd for terminal in insert mode - added keybind for opening terminal - added keybinds for lsp commands - added lua lsp setup - added nvim-cmp - added keybind for editing config - added keybinds for opening splits - added conceallevel = 2 - commented encoding options - plugins: - added go.nvim - added cmp-calc - markdown: - disable pairs for quotes - added pairs in markdown - go: - added go lsp - added autoformat of go files on save
Diffstat (limited to 'after')
-rw-r--r--after/plugin/autoclose.lua34
-rw-r--r--after/plugin/conform.lua10
-rw-r--r--after/plugin/vim-tmux-navigator.lua6
3 files changed, 34 insertions, 16 deletions
diff --git a/after/plugin/autoclose.lua b/after/plugin/autoclose.lua
index 543d7d9..b742fc6 100644
--- a/after/plugin/autoclose.lua
+++ b/after/plugin/autoclose.lua
@@ -1,20 +1,34 @@
-require("autoclose").setup({
+local filetypes = require("autoclose").setup({
keys = {
["("] = { escape = false, close = true, pair = "()" },
- ["["] = { escape = false, close = true, pair = "[]" },
- ["{"] = { escape = false, close = true, pair = "{}" },
-
- [">"] = { escape = true, close = false, pair = "<>" },
[")"] = { escape = true, close = false, pair = "()" },
+ ["["] = { escape = false, close = true, pair = "[]" },
["]"] = { escape = true, close = false, pair = "[]" },
+ ["{"] = { escape = false, close = true, pair = "{}" },
["}"] = { escape = true, close = false, pair = "{}" },
-
- ['"'] = { escape = true, close = true, pair = '""' },
- ["'"] = { escape = true, close = true, pair = "''" },
- ["`"] = { escape = true, close = true, pair = "``" },
+ [">"] = { escape = true, close = false, pair = "<>" },
+ ['"'] = {
+ escape = true,
+ close = true,
+ pair = '""',
+ disabled_filetypes = { "text", "telekasten", "groff", "diff", "gitcommit", "fugitive", "markdown" },
+ },
+ ["'"] = {
+ escape = true,
+ close = true,
+ pair = "''",
+ disabled_filetypes = { "text", "telekasten", "groff", "diff", "gitcommit", "fugitive", "markdown" },
+ },
+ ["`"] = {
+ escape = true,
+ close = true,
+ pair = "``",
+ disabled_filetypes = { "text", "telekasten", "groff", "diff", "gitcommit", "fugitive" },
+ },
+ ["*"] = { escape = true, close = true, pair = "**", enabled_filetypes = { "markdown" } },
+ ["_"] = { escape = true, close = true, pair = "__", enabled_filetypes = { "markdown" } },
},
options = {
- disabled_filetypes = { "text", "telekasten", "groff", "diff", "gitcommit", "fugitive" },
disable_when_touch = true,
},
})
diff --git a/after/plugin/conform.lua b/after/plugin/conform.lua
new file mode 100644
index 0000000..13961b6
--- /dev/null
+++ b/after/plugin/conform.lua
@@ -0,0 +1,10 @@
+require("conform").setup({
+ formatters_by_ft = {
+ lua = { "stylua" },
+ },
+ format_on_save = {
+ -- These options will be passed to conform.format()
+ timeout_ms = 500,
+ lsp_format = "fallback",
+ },
+})
diff --git a/after/plugin/vim-tmux-navigator.lua b/after/plugin/vim-tmux-navigator.lua
deleted file mode 100644
index 1574080..0000000
--- a/after/plugin/vim-tmux-navigator.lua
+++ /dev/null
@@ -1,6 +0,0 @@
-vim.g.tmux_navigator_no_mappings = true
-vim.keymap.set("n", "<M-h>", ":<C-U>TmuxNavigateLeft<cr>", { silent = true })
-vim.keymap.set("n", "<M-j>", ":<C-U>TmuxNavigateDown<cr>", { silent = true })
-vim.keymap.set("n", "<M-k>", ":<C-U>TmuxNavigateUp<cr>", { silent = true })
-vim.keymap.set("n", "<M-l>", ":<C-U>TmuxNavigateRight<cr>", { silent = true })
-vim.keymap.set("n", "<M-/>", ":<C-U>TmuxNavigatePrevious<cr>", { silent = true })