aboutsummaryrefslogtreecommitdiffhomepage
path: root/vim/lua/configs
diff options
context:
space:
mode:
Diffstat (limited to 'vim/lua/configs')
-rw-r--r--vim/lua/configs/conform.lua15
-rw-r--r--vim/lua/configs/lazy.lua47
-rw-r--r--vim/lua/configs/lspconfig.lua23
-rw-r--r--vim/lua/configs/telescope.lua48
-rw-r--r--vim/lua/configs/treesitter.lua62
5 files changed, 195 insertions, 0 deletions
diff --git a/vim/lua/configs/conform.lua b/vim/lua/configs/conform.lua
new file mode 100644
index 0000000..a000447
--- /dev/null
+++ b/vim/lua/configs/conform.lua
@@ -0,0 +1,15 @@
1local options = {
2 formatters_by_ft = {
3 lua = { "stylua" },
4 -- css = { "prettier" },
5 -- html = { "prettier" },
6 },
7
8 -- format_on_save = {
9 -- -- These options will be passed to conform.format()
10 -- timeout_ms = 500,
11 -- lsp_fallback = true,
12 -- },
13}
14
15require("conform").setup(options)
diff --git a/vim/lua/configs/lazy.lua b/vim/lua/configs/lazy.lua
new file mode 100644
index 0000000..cd170bd
--- /dev/null
+++ b/vim/lua/configs/lazy.lua
@@ -0,0 +1,47 @@
1return {
2 defaults = { lazy = true },
3 install = { colorscheme = { "nvchad" } },
4
5 ui = {
6 icons = {
7 ft = "",
8 lazy = "󰂠 ",
9 loaded = "",
10 not_loaded = "",
11 },
12 },
13
14 performance = {
15 rtp = {
16 disabled_plugins = {
17 "2html_plugin",
18 "tohtml",
19 "getscript",
20 "getscriptPlugin",
21 "gzip",
22 "logipat",
23 "netrw",
24 "netrwPlugin",
25 "netrwSettings",
26 "netrwFileHandlers",
27 "matchit",
28 "tar",
29 "tarPlugin",
30 "rrhelper",
31 "spellfile_plugin",
32 "vimball",
33 "vimballPlugin",
34 "zip",
35 "zipPlugin",
36 "tutor",
37 "rplugin",
38 "syntax",
39 "synmenu",
40 "optwin",
41 "compiler",
42 "bugreport",
43 "ftplugin",
44 },
45 },
46 },
47}
diff --git a/vim/lua/configs/lspconfig.lua b/vim/lua/configs/lspconfig.lua
new file mode 100644
index 0000000..a73657a
--- /dev/null
+++ b/vim/lua/configs/lspconfig.lua
@@ -0,0 +1,23 @@
1-- EXAMPLE
2local on_attach = require("nvchad.configs.lspconfig").on_attach
3local on_init = require("nvchad.configs.lspconfig").on_init
4local capabilities = require("nvchad.configs.lspconfig").capabilities
5
6local lspconfig = require "lspconfig"
7local servers = { "html", "cssls" }
8
9-- lsps with default config
10for _, lsp in ipairs(servers) do
11 lspconfig[lsp].setup {
12 on_attach = on_attach,
13 on_init = on_init,
14 capabilities = capabilities,
15 }
16end
17
18-- typescript
19lspconfig.tsserver.setup {
20 on_attach = on_attach,
21 on_init = on_init,
22 capabilities = capabilities,
23}
diff --git a/vim/lua/configs/telescope.lua b/vim/lua/configs/telescope.lua
new file mode 100644
index 0000000..73c64e5
--- /dev/null
+++ b/vim/lua/configs/telescope.lua
@@ -0,0 +1,48 @@
1return {
2 defaults = {
3 mappings = {
4 i = {
5 -- ["<c-j>"] = "move_selection_next",
6 -- ["<c-k>"] = "move_selection_previous",
7 ["<C-w>"] = require("telescope.actions.layout").toggle_preview,
8 ["<C-u>"] = false,
9 },
10 },
11 layout_config = {
12 horizontal = {
13 prompt_position = "bottom",
14 },
15 vertical = { height = 0.8 },
16 -- other layout configuration here
17 preview_cutoff = 0,
18 },
19 },
20 pickers = {
21 buffers = {
22 show_all_buffers = true,
23 sort_lastused = true,
24 theme = "dropdown",
25 previewer = false,
26 mappings = {
27 i = {
28 ["<c-d>"] = "delete_buffer",
29 },
30 n = {
31 ["<c-d>"] = "delete_buffer",
32 }
33 }
34 },
35
36 },
37 extensions_list = {},
38 extensions = {
39 aerial = {
40 -- Display symbols as <root>.<parent>.<symbol>
41 show_nesting = {
42 ["_"] = false, -- This key will be the default
43 json = true, -- You can set the option for specific filetypes
44 yaml = true,
45 },
46 },
47 },
48}
diff --git a/vim/lua/configs/treesitter.lua b/vim/lua/configs/treesitter.lua
new file mode 100644
index 0000000..8375d5b
--- /dev/null
+++ b/vim/lua/configs/treesitter.lua
@@ -0,0 +1,62 @@
1return {
2 -- Add languages to be installed here that you want installed for treesitter
3 ensure_installed = { 'bash', 'c', 'html', 'css', 'lua', 'python', 'rust', 'tsx', 'typescript', 'vimdoc', 'vim' },
4
5 -- Autoinstall languages that are not installed. Defaults to false (but you can change for yourself!)
6 auto_install = true,
7
8 -- highlight = { enable = true },
9 incremental_selection = {
10 enable = true,
11 keymaps = {
12 init_selection = '<c-space>',
13 node_incremental = '<c-space>',
14 scope_incremental = '<c-s>',
15 node_decremental = '<M-space>',
16 },
17 },
18 textobjects = {
19 select = {
20 enable = true,
21 lookahead = true, -- Automatically jump forward to textobj, similar to targets.vim
22 keymaps = {
23 -- You can use the capture groups defined in textobjects.scm
24 ['aa'] = '@parameter.outer',
25 ['ia'] = '@parameter.inner',
26 ['af'] = '@function.outer',
27 ['if'] = '@function.inner',
28 ['ac'] = '@class.outer',
29 ['ic'] = '@class.inner',
30 },
31 },
32 move = {
33 enable = true,
34 set_jumps = true, -- whether to set jumps in the jumplist
35 goto_next_start = {
36 [']f'] = '@function.outer',
37 [']c'] = '@class.outer',
38 },
39 goto_next_end = {
40 [']F'] = '@function.outer',
41 [']C'] = '@class.outer',
42 },
43 goto_previous_start = {
44 ['[f'] = '@function.outer',
45 ['[c'] = '@class.outer',
46 },
47 goto_previous_end = {
48 ['[F'] = '@function.outer',
49 ['[C'] = '@class.outer',
50 },
51 },
52 swap = {
53 enable = true,
54 swap_next = {
55 ['<leader>a'] = '@parameter.inner',
56 },
57 swap_previous = {
58 ['<leader>A'] = '@parameter.inner',
59 },
60 },
61 },
62}