home: vim: use actual lua files
Since most of the settings are actually just lua in a VimL file.
This commit is contained in:
parent
9530864b10
commit
c2d231d3f1
|
@ -1,4 +1,3 @@
|
||||||
lua << EOF
|
|
||||||
local wk = require("which-key")
|
local wk = require("which-key")
|
||||||
|
|
||||||
local keys = {
|
local keys = {
|
||||||
|
@ -9,4 +8,3 @@ local keys = {
|
||||||
}
|
}
|
||||||
|
|
||||||
wk.register(keys, { prefix = "gc" })
|
wk.register(keys, { prefix = "gc" })
|
||||||
EOF
|
|
|
@ -1,4 +1,3 @@
|
||||||
lua << EOF
|
|
||||||
local wk = require("which-key")
|
local wk = require("which-key")
|
||||||
|
|
||||||
local keys = {
|
local keys = {
|
||||||
|
@ -6,4 +5,3 @@ local keys = {
|
||||||
}
|
}
|
||||||
|
|
||||||
wk.register(keys, { prefix = "<leader>" })
|
wk.register(keys, { prefix = "<leader>" })
|
||||||
EOF
|
|
|
@ -1,4 +1,3 @@
|
||||||
lua << EOF
|
|
||||||
local wk = require("which-key")
|
local wk = require("which-key")
|
||||||
local telescope_builtin = require("telescope.builtin")
|
local telescope_builtin = require("telescope.builtin")
|
||||||
|
|
||||||
|
@ -14,5 +13,3 @@ local keys = {
|
||||||
}
|
}
|
||||||
|
|
||||||
wk.register(keys, { prefix = "<leader>" })
|
wk.register(keys, { prefix = "<leader>" })
|
||||||
EOF
|
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
lua << EOF
|
|
||||||
local wk = require("which-key")
|
local wk = require("which-key")
|
||||||
|
|
||||||
local motions = {
|
local motions = {
|
||||||
|
@ -29,4 +28,3 @@ local objects = {
|
||||||
|
|
||||||
wk.register(motions, { mode = "n" })
|
wk.register(motions, { mode = "n" })
|
||||||
wk.register(objects, { mode = "o" })
|
wk.register(objects, { mode = "o" })
|
||||||
EOF
|
|
|
@ -1,4 +1,3 @@
|
||||||
lua << EOF
|
|
||||||
local wk = require("which-key")
|
local wk = require("which-key")
|
||||||
|
|
||||||
local keys = {
|
local keys = {
|
||||||
|
@ -125,4 +124,3 @@ local keys = {
|
||||||
}
|
}
|
||||||
|
|
||||||
wk.register(keys)
|
wk.register(keys)
|
||||||
EOF
|
|
|
@ -1,4 +1,3 @@
|
||||||
lua << EOF
|
|
||||||
local abbreviations = {
|
local abbreviations = {
|
||||||
-- A few things that are hard to write in ASCII
|
-- A few things that are hard to write in ASCII
|
||||||
["(R)"] = "©",
|
["(R)"] = "©",
|
||||||
|
@ -8,4 +7,3 @@ local abbreviations = {
|
||||||
for text, result in pairs(abbreviations) do
|
for text, result in pairs(abbreviations) do
|
||||||
vim.cmd.abbreviate(text, result)
|
vim.cmd.abbreviate(text, result)
|
||||||
end
|
end
|
||||||
EOF
|
|
|
@ -1,4 +1,3 @@
|
||||||
lua << EOF
|
|
||||||
-- Show lines numbers
|
-- Show lines numbers
|
||||||
vim.opt.number = true
|
vim.opt.number = true
|
||||||
|
|
||||||
|
@ -22,4 +21,3 @@ vim.api.nvim_create_autocmd({ "TermOpen" }, {
|
||||||
group = numbertoggle,
|
group = numbertoggle,
|
||||||
command = "setlocal nonu nornu",
|
command = "setlocal nonu nornu",
|
||||||
})
|
})
|
||||||
EOF
|
|
|
@ -1,4 +1,3 @@
|
||||||
lua << EOF
|
|
||||||
-- Show completion menu in all cases, and don't select anything
|
-- Show completion menu in all cases, and don't select anything
|
||||||
vim.opt.completeopt = { "menu", "menuone", "noselect" }
|
vim.opt.completeopt = { "menu", "menuone", "noselect" }
|
||||||
|
|
||||||
|
@ -61,4 +60,3 @@ cmp.setup({
|
||||||
ghost_text = true,
|
ghost_text = true,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
EOF
|
|
|
@ -1,8 +1,6 @@
|
||||||
lua << EOF
|
|
||||||
local dressing = require("dressing")
|
local dressing = require("dressing")
|
||||||
|
|
||||||
dressing.setup({
|
dressing.setup({
|
||||||
-- Use a relative prompt size
|
-- Use a relative prompt size
|
||||||
prefer_width = 0.4,
|
prefer_width = 0.4,
|
||||||
})
|
})
|
||||||
EOF
|
|
|
@ -1,6 +1,4 @@
|
||||||
lua << EOF
|
|
||||||
-- Intercept all fold commands
|
-- Intercept all fold commands
|
||||||
vim.g.fastfold_fold_command_suffixes = {
|
vim.g.fastfold_fold_command_suffixes = {
|
||||||
"x", "X", "a", "A", "o", "O", "c", "C", "r", "R", "m", "M", "i", "n", "N",
|
"x", "X", "a", "A", "o", "O", "c", "C", "r", "R", "m", "M", "i", "n", "N",
|
||||||
}
|
}
|
||||||
EOF
|
|
|
@ -1,4 +1,3 @@
|
||||||
lua << EOF
|
|
||||||
local gitsigns = require('gitsigns')
|
local gitsigns = require('gitsigns')
|
||||||
local wk = require("which-key")
|
local wk = require("which-key")
|
||||||
|
|
||||||
|
@ -57,4 +56,3 @@ local visual = {
|
||||||
wk.register(keys, { buffer = bufnr })
|
wk.register(keys, { buffer = bufnr })
|
||||||
wk.register(objects, { buffer = bufnr, mode = "o" })
|
wk.register(objects, { buffer = bufnr, mode = "o" })
|
||||||
wk.register(visual, { buffer = bufnr, mode = "x" })
|
wk.register(visual, { buffer = bufnr, mode = "x" })
|
||||||
EOF
|
|
|
@ -1,4 +1,3 @@
|
||||||
lua << EOF
|
|
||||||
local lspconfig = require("lspconfig")
|
local lspconfig = require("lspconfig")
|
||||||
local lsp = require("ambroisie.lsp")
|
local lsp = require("ambroisie.lsp")
|
||||||
local utils = require("ambroisie.utils")
|
local utils = require("ambroisie.utils")
|
||||||
|
@ -44,4 +43,3 @@ if utils.is_executable("rust-analyzer") then
|
||||||
on_attach = lsp.on_attach,
|
on_attach = lsp.on_attach,
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
EOF
|
|
|
@ -1,4 +1,3 @@
|
||||||
lua << EOF
|
|
||||||
local lualine = require("lualine")
|
local lualine = require("lualine")
|
||||||
local utils = require("ambroisie.utils")
|
local utils = require("ambroisie.utils")
|
||||||
|
|
||||||
|
@ -60,4 +59,3 @@ lualine.setup({
|
||||||
"quickfix",
|
"quickfix",
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
EOF
|
|
|
@ -1,3 +1 @@
|
||||||
lua << EOF
|
|
||||||
require("luasnip.loaders.from_vscode").lazy_load()
|
require("luasnip.loaders.from_vscode").lazy_load()
|
||||||
EOF
|
|
|
@ -1,4 +1,3 @@
|
||||||
lua << EOF
|
|
||||||
local null_ls = require("null-ls")
|
local null_ls = require("null-ls")
|
||||||
local lsp = require("ambroisie.lsp")
|
local lsp = require("ambroisie.lsp")
|
||||||
local utils = require("ambroisie.utils")
|
local utils = require("ambroisie.utils")
|
||||||
|
@ -122,4 +121,3 @@ null_ls.register({
|
||||||
condition = utils.is_executable_condition("shfmt"),
|
condition = utils.is_executable_condition("shfmt"),
|
||||||
}),
|
}),
|
||||||
})
|
})
|
||||||
EOF
|
|
|
@ -1,5 +1,3 @@
|
||||||
lua << EOF
|
|
||||||
require("nvim-surround").setup({
|
require("nvim-surround").setup({
|
||||||
-- No configuration at the moment
|
-- No configuration at the moment
|
||||||
})
|
})
|
||||||
EOF
|
|
|
@ -1,4 +1,3 @@
|
||||||
lua << EOF
|
|
||||||
local telescope = require("telescope")
|
local telescope = require("telescope")
|
||||||
|
|
||||||
telescope.setup({
|
telescope.setup({
|
||||||
|
@ -23,4 +22,3 @@ telescope.setup({
|
||||||
|
|
||||||
telescope.load_extension("fzf")
|
telescope.load_extension("fzf")
|
||||||
telescope.load_extension("lsp_handlers")
|
telescope.load_extension("lsp_handlers")
|
||||||
EOF
|
|
|
@ -1,4 +1,3 @@
|
||||||
lua << EOF
|
|
||||||
local ts_config = require("nvim-treesitter.configs")
|
local ts_config = require("nvim-treesitter.configs")
|
||||||
ts_config.setup({
|
ts_config.setup({
|
||||||
highlight = {
|
highlight = {
|
||||||
|
@ -55,4 +54,3 @@ ts_config.setup({
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
EOF
|
|
|
@ -1,4 +1,2 @@
|
||||||
lua << EOF
|
|
||||||
local wk = require("which-key")
|
local wk = require("which-key")
|
||||||
wk.setup()
|
wk.setup()
|
||||||
EOF
|
|
|
@ -1,4 +1,3 @@
|
||||||
lua << EOF
|
|
||||||
local signtoggle = vim.api.nvim_create_augroup("signtoggle", { clear = true })
|
local signtoggle = vim.api.nvim_create_augroup("signtoggle", { clear = true })
|
||||||
|
|
||||||
-- Only show sign column for the currently focused buffer
|
-- Only show sign column for the currently focused buffer
|
||||||
|
@ -19,4 +18,3 @@ vim.api.nvim_create_autocmd({ "TermOpen" }, {
|
||||||
group = signtoggle,
|
group = signtoggle,
|
||||||
command = "setlocal signcolumn=no",
|
command = "setlocal signcolumn=no",
|
||||||
})
|
})
|
||||||
EOF
|
|
Loading…
Reference in a new issue