diff options
| author | cryxtalix <fgx8p9t@protonmail.com> | 2026-05-09 00:15:07 +0800 |
|---|---|---|
| committer | cryxtalix <fgx8p9t@protonmail.com> | 2026-05-09 00:15:07 +0800 |
| commit | 8fbf7c2a9ce92b97941bff2c8b52c1d52d9834d2 (patch) | |
| tree | aa4cb6f169758fb9abdcf5b378a1a8ccc6902344 /.config/nvim_old/ftplugin | |
| parent | 1302056eddd9a69ea2d0ffdf8bedd8582fb5a907 (diff) | |
Update
Diffstat (limited to '.config/nvim_old/ftplugin')
| -rw-r--r-- | .config/nvim_old/ftplugin/c.lua | 12 | ||||
| -rw-r--r-- | .config/nvim_old/ftplugin/cpp.lua | 12 | ||||
| -rw-r--r-- | .config/nvim_old/ftplugin/html.lua | 12 | ||||
| -rw-r--r-- | .config/nvim_old/ftplugin/htmldjango.lua | 12 | ||||
| -rw-r--r-- | .config/nvim_old/ftplugin/json.lua | 12 | ||||
| -rw-r--r-- | .config/nvim_old/ftplugin/lua.lua | 14 | ||||
| -rw-r--r-- | .config/nvim_old/ftplugin/make.lua | 12 | ||||
| -rw-r--r-- | .config/nvim_old/ftplugin/python.lua | 12 | ||||
| -rw-r--r-- | .config/nvim_old/ftplugin/rust.lua | 31 | ||||
| -rw-r--r-- | .config/nvim_old/ftplugin/sh.lua | 12 | ||||
| -rw-r--r-- | .config/nvim_old/ftplugin/toml.lua | 12 | ||||
| -rw-r--r-- | .config/nvim_old/ftplugin/xml.lua | 12 |
12 files changed, 165 insertions, 0 deletions
diff --git a/.config/nvim_old/ftplugin/c.lua b/.config/nvim_old/ftplugin/c.lua new file mode 100644 index 0000000..4514ab3 --- /dev/null +++ b/.config/nvim_old/ftplugin/c.lua @@ -0,0 +1,12 @@ +local indent_size = 8 +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_old/ftplugin/cpp.lua b/.config/nvim_old/ftplugin/cpp.lua new file mode 100644 index 0000000..4514ab3 --- /dev/null +++ b/.config/nvim_old/ftplugin/cpp.lua @@ -0,0 +1,12 @@ +local indent_size = 8 +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_old/ftplugin/html.lua b/.config/nvim_old/ftplugin/html.lua new file mode 100644 index 0000000..3fbcec4 --- /dev/null +++ b/.config/nvim_old/ftplugin/html.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_old/ftplugin/htmldjango.lua b/.config/nvim_old/ftplugin/htmldjango.lua new file mode 100644 index 0000000..3fbcec4 --- /dev/null +++ b/.config/nvim_old/ftplugin/htmldjango.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_old/ftplugin/json.lua b/.config/nvim_old/ftplugin/json.lua new file mode 100644 index 0000000..3fbcec4 --- /dev/null +++ b/.config/nvim_old/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_old/ftplugin/lua.lua b/.config/nvim_old/ftplugin/lua.lua new file mode 100644 index 0000000..275b1a9 --- /dev/null +++ b/.config/nvim_old/ftplugin/lua.lua @@ -0,0 +1,14 @@ +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) + +-- Check http://vimcasts.org/episodes/tabs-and-spaces/ for more info on tabs and spaces diff --git a/.config/nvim_old/ftplugin/make.lua b/.config/nvim_old/ftplugin/make.lua new file mode 100644 index 0000000..2ad7f95 --- /dev/null +++ b/.config/nvim_old/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_old/ftplugin/python.lua b/.config/nvim_old/ftplugin/python.lua new file mode 100644 index 0000000..3fbcec4 --- /dev/null +++ b/.config/nvim_old/ftplugin/python.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_old/ftplugin/rust.lua b/.config/nvim_old/ftplugin/rust.lua new file mode 100644 index 0000000..029f0da --- /dev/null +++ b/.config/nvim_old/ftplugin/rust.lua @@ -0,0 +1,31 @@ +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 + +local bufnr = vim.api.nvim_get_current_buf() +vim.keymap.set( + "n", + "<leader>a", + function() + vim.cmd.RustLsp('codeAction') -- supports rust-analyzer's grouping + -- or vim.lsp.buf.codeAction() if you don't want grouping. + end, + { silent = true, buffer = bufnr } +) +vim.keymap.set( + "n", + "K", -- Override Neovim's built-in hover keymap with rustaceanvim's hover actions + function() + vim.cmd.RustLsp({'hover', 'actions'}) + end, + { silent = true, buffer = bufnr } +) + +vim.cmd(settings) diff --git a/.config/nvim_old/ftplugin/sh.lua b/.config/nvim_old/ftplugin/sh.lua new file mode 100644 index 0000000..4d8e3f2 --- /dev/null +++ b/.config/nvim_old/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_old/ftplugin/toml.lua b/.config/nvim_old/ftplugin/toml.lua new file mode 100644 index 0000000..3fbcec4 --- /dev/null +++ b/.config/nvim_old/ftplugin/toml.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_old/ftplugin/xml.lua b/.config/nvim_old/ftplugin/xml.lua new file mode 100644 index 0000000..4d8e3f2 --- /dev/null +++ b/.config/nvim_old/ftplugin/xml.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) |
