diff options
| author | Cryxtalix <fgx8p9t@protonmail.com> | 2025-02-07 04:28:13 +0800 |
|---|---|---|
| committer | Cryxtalix <fgx8p9t@protonmail.com> | 2025-02-07 04:28:13 +0800 |
| commit | b6b7c5b0eedb9ea28c7d7429cbeb73d8f996520e (patch) | |
| tree | e641d96713c43a3ef8dc548b2bef5bf89e374e61 /.config | |
| parent | ad03e606b4aaebf2fbad9e6f9ea1d9ebace308df (diff) | |
Added ssh configuration
Diffstat (limited to '.config')
| -rw-r--r-- | .config/nvim/ftplugin/c.lua | 11 | ||||
| -rw-r--r-- | .config/nvim/ftplugin/json.lua | 12 | ||||
| -rw-r--r-- | .config/nvim/ftplugin/lua.lua | 11 | ||||
| -rw-r--r-- | .config/nvim/ftplugin/make.lua | 12 | ||||
| -rw-r--r-- | .config/nvim/ftplugin/python.lua | 11 | ||||
| -rw-r--r-- | .config/nvim/ftplugin/rust.lua | 11 | ||||
| -rw-r--r-- | .config/nvim/ftplugin/sh.lua | 12 | ||||
| -rw-r--r-- | .config/nvim/lazy-lock.json | 35 | ||||
| -rw-r--r-- | .config/nvim/lua/plugins/lsp.lua | 2 |
9 files changed, 87 insertions, 30 deletions
diff --git a/.config/nvim/ftplugin/c.lua b/.config/nvim/ftplugin/c.lua index 0a3ce37..4514ab3 100644 --- a/.config/nvim/ftplugin/c.lua +++ b/.config/nvim/ftplugin/c.lua @@ -1,5 +1,12 @@ -local size = 8 +local indent_size = 8 +local use_tabs = false -local settings = string.format("setlocal softtabstop=%s tabstop=%s shiftwidth=%s expandtab", size, size, size) +local settings = string.format("setlocal softtabstop=%s tabstop=%s shiftwidth=%s", indent_size, indent_size, indent_size) + +if use_tabs == true then + settings = settings .. " noexpandtab" +else + settings = settings .. " expandtab" +end vim.cmd(settings) diff --git a/.config/nvim/ftplugin/json.lua b/.config/nvim/ftplugin/json.lua new file mode 100644 index 0000000..3fbcec4 --- /dev/null +++ b/.config/nvim/ftplugin/json.lua @@ -0,0 +1,12 @@ +local indent_size = 4 +local use_tabs = false + +local settings = string.format("setlocal softtabstop=%s tabstop=%s shiftwidth=%s", indent_size, indent_size, indent_size) + +if use_tabs == true then + settings = settings .. " noexpandtab" +else + settings = settings .. " expandtab" +end + +vim.cmd(settings) diff --git a/.config/nvim/ftplugin/lua.lua b/.config/nvim/ftplugin/lua.lua index 370eb6e..275b1a9 100644 --- a/.config/nvim/ftplugin/lua.lua +++ b/.config/nvim/ftplugin/lua.lua @@ -1,6 +1,13 @@ -local size = 2 +local indent_size = 2 +local use_tabs = false -local settings = string.format("setlocal softtabstop=%s tabstop=%s shiftwidth=%s expandtab", size, size, size) +local settings = string.format("setlocal softtabstop=%s tabstop=%s shiftwidth=%s", indent_size, indent_size, indent_size) + +if use_tabs == true then + settings = settings .. " noexpandtab" +else + settings = settings .. " expandtab" +end vim.cmd(settings) diff --git a/.config/nvim/ftplugin/make.lua b/.config/nvim/ftplugin/make.lua new file mode 100644 index 0000000..2ad7f95 --- /dev/null +++ b/.config/nvim/ftplugin/make.lua @@ -0,0 +1,12 @@ +local indent_size = 8 +local use_tabs = true + +local settings = string.format("setlocal softtabstop=%s tabstop=%s shiftwidth=%s", indent_size, indent_size, indent_size) + +if use_tabs == true then + settings = settings .. " noexpandtab" +else + settings = settings .. " expandtab" +end + +vim.cmd(settings) diff --git a/.config/nvim/ftplugin/python.lua b/.config/nvim/ftplugin/python.lua index eb4045f..3fbcec4 100644 --- a/.config/nvim/ftplugin/python.lua +++ b/.config/nvim/ftplugin/python.lua @@ -1,5 +1,12 @@ -local size = 4 +local indent_size = 4 +local use_tabs = false -local settings = string.format("setlocal softtabstop=%s tabstop=%s shiftwidth=%s expandtab", size, size, size) +local settings = string.format("setlocal softtabstop=%s tabstop=%s shiftwidth=%s", indent_size, indent_size, indent_size) + +if use_tabs == true then + settings = settings .. " noexpandtab" +else + settings = settings .. " expandtab" +end vim.cmd(settings) diff --git a/.config/nvim/ftplugin/rust.lua b/.config/nvim/ftplugin/rust.lua index eb4045f..3fbcec4 100644 --- a/.config/nvim/ftplugin/rust.lua +++ b/.config/nvim/ftplugin/rust.lua @@ -1,5 +1,12 @@ -local size = 4 +local indent_size = 4 +local use_tabs = false -local settings = string.format("setlocal softtabstop=%s tabstop=%s shiftwidth=%s expandtab", size, size, size) +local settings = string.format("setlocal softtabstop=%s tabstop=%s shiftwidth=%s", indent_size, indent_size, indent_size) + +if use_tabs == true then + settings = settings .. " noexpandtab" +else + settings = settings .. " expandtab" +end vim.cmd(settings) diff --git a/.config/nvim/ftplugin/sh.lua b/.config/nvim/ftplugin/sh.lua new file mode 100644 index 0000000..4d8e3f2 --- /dev/null +++ b/.config/nvim/ftplugin/sh.lua @@ -0,0 +1,12 @@ +local indent_size = 2 +local use_tabs = false + +local settings = string.format("setlocal softtabstop=%s tabstop=%s shiftwidth=%s", indent_size, indent_size, indent_size) + +if use_tabs == true then + settings = settings .. " noexpandtab" +else + settings = settings .. " expandtab" +end + +vim.cmd(settings) diff --git a/.config/nvim/lazy-lock.json b/.config/nvim/lazy-lock.json index 47d0d99..4833389 100644 --- a/.config/nvim/lazy-lock.json +++ b/.config/nvim/lazy-lock.json @@ -1,31 +1,24 @@ { - "LuaSnip": { "branch": "master", "commit": "33b06d72d220aa56a7ce80a0dd6f06c70cd82b9d" }, + "LuaSnip": { "branch": "master", "commit": "c9b9a22904c97d0eb69ccb9bab76037838326817" }, "cmp-nvim-lsp": { "branch": "main", "commit": "99290b3ec1322070bcfb9e846450a46f6efa50f0" }, "cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" }, "friendly-snippets": { "branch": "main", "commit": "efff286dd74c22f731cdec26a70b46e5b203c619" }, - "hererocks": { "branch": "master", "commit": "c9c5444dea1e07e005484014a8231aa667be30b6" }, - "image.nvim": { "branch": "master", "commit": "b3e1af829a56bb038e5f81bf97798a2950064b62" }, - "lazy.nvim": { "branch": "main", "commit": "7e6c863bc7563efbdd757a310d17ebc95166cef3" }, - "luarocks.nvim": { "branch": "main", "commit": "1db9093915eb16ba2473cfb8d343ace5ee04130a" }, - "magick": { "branch": "master", "commit": "6971fa700c4d392130492a3925344b51c7cc54aa" }, + "lazy.nvim": { "branch": "main", "commit": "d8f26efd456190241afd1b0f5235fe6fdba13d4a" }, "markdown-toc": { "branch": "main", "commit": "1454bf3b4bcb855f7df41c59dfae08cc824141a0" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "8e46de9241d3997927af12196bd8faa0ed08c29a" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "e942edf5c85b6a2ab74059ea566cac5b3e1514a4" }, "mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" }, - "mini.nvim": { "branch": "main", "commit": "7ebfab26d77a4b9b05aaae565907e7fa4b2ee154" }, - "neo-tree.nvim": { "branch": "v3.x", "commit": "a77af2e764c5ed4038d27d1c463fa49cd4794e07" }, - "none-ls.nvim": { "branch": "main", "commit": "c279e541f73a2deea9deb5231b9c037678dd6353" }, - "nui.nvim": { "branch": "main", "commit": "53e907ffe5eedebdca1cd503b00aa8692068ca46" }, - "nvim-cmp": { "branch": "main", "commit": "3403e2e9391ed0a28c3afddd8612701b647c8e26" }, - "nvim-dap": { "branch": "master", "commit": "567da83810dd9da32f9414d941bc6848715fc102" }, - "nvim-dap-ui": { "branch": "master", "commit": "ffa89839f97bad360e78428d5c740fdad9a0ff02" }, - "nvim-dap-virtual-text": { "branch": "master", "commit": "76d80c3d171224315b61c006502a1e30c213a9ab" }, - "nvim-lspconfig": { "branch": "master", "commit": "9f2c279cf9abe584f03bfeb37c6658d68e3ff49d" }, + "mini.nvim": { "branch": "main", "commit": "44a3ab2bc6b40edeb7a76359826c9779d5c70cb5" }, + "none-ls.nvim": { "branch": "main", "commit": "af318216b744f2fe2d5afa6febb01f455ae61d6c" }, + "nvim-cmp": { "branch": "main", "commit": "8c82d0bd31299dbff7f8e780f5e06d2283de9678" }, + "nvim-dap": { "branch": "master", "commit": "99807078c5089ed30e0547aa4b52c5867933f426" }, + "nvim-dap-ui": { "branch": "master", "commit": "727c032a8f63899baccb42a1c26f27687e62fc5e" }, + "nvim-dap-virtual-text": { "branch": "master", "commit": "df66808cd78b5a97576bbaeee95ed5ca385a9750" }, + "nvim-lspconfig": { "branch": "master", "commit": "339ccc81e08793c3af9b83882a6ebd90c9cc0d3b" }, "nvim-nio": { "branch": "master", "commit": "a428f309119086dc78dd4b19306d2d67be884eee" }, - "nvim-treesitter": { "branch": "master", "commit": "c47d8d27d047634d00a07ca80a1b694624743b38" }, - "nvim-web-devicons": { "branch": "master", "commit": "0eb18da56e2ba6ba24de7130a12bcc4e31ad11cb" }, - "plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" }, - "render-markdown.nvim": { "branch": "main", "commit": "0022a579ac7355966be5ade77699b88c76b6a549" }, - "ripgrep": { "branch": "master", "commit": "79cbe89deb1151e703f4d91b19af9cdcc128b765" }, + "nvim-treesitter": { "branch": "master", "commit": "5da195ac3dfafd08d8b10756d975f0e01e1d563a" }, + "plenary.nvim": { "branch": "master", "commit": "3707cdb1e43f5cea73afb6037e6494e7ce847a66" }, + "render-markdown.nvim": { "branch": "main", "commit": "ad055861d17afe058bd835e82292e14a64b51b1d" }, + "ripgrep": { "branch": "master", "commit": "d6b59feff890f038acde7d5e151995d8aec1e107" }, "telescope-dap.nvim": { "branch": "master", "commit": "783366bd6c1e7fa0a5c59c07db37f49c805a28df" }, "telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" }, "telescope.nvim": { "branch": "master", "commit": "d90956833d7c27e73c621a61f20b29fdb7122709" } diff --git a/.config/nvim/lua/plugins/lsp.lua b/.config/nvim/lua/plugins/lsp.lua index 0ddbbe9..2fbba75 100644 --- a/.config/nvim/lua/plugins/lsp.lua +++ b/.config/nvim/lua/plugins/lsp.lua @@ -41,7 +41,7 @@ return { capabilities = capabilities }) lspconfig.rust_analyzer.setup({ - capabilities = capabilities + capabilities = capabilities, }) -- Key mapping |
