diff --git a/after/ftplugin/vue.lua b/after/ftplugin/vue.lua new file mode 100644 index 0000000..10c1efc --- /dev/null +++ b/after/ftplugin/vue.lua @@ -0,0 +1,4 @@ +vim.bo.tabstop = 2 -- size of a hard tabstop (ts). +vim.bo.shiftwidth = 2 -- size of an indentation (sw). +vim.bo.expandtab = true -- always uses spaces instead of tab characters (et). +vim.bo.softtabstop = 2 -- number of spaces a counts for. When 0, feature is off (sts). diff --git a/after/plugin/lsp.lua b/after/plugin/lsp.lua index a8cd60c..3a230b8 100644 --- a/after/plugin/lsp.lua +++ b/after/plugin/lsp.lua @@ -41,6 +41,7 @@ vim.api.nvim_create_autocmd('LspAttach', { -- Execute a code action, usually your cursor needs to be on top of an error -- or a suggestion from your LSP for this to activate. map('ca', vim.lsp.buf.code_action, '[C]ode [A]ction') + map('cf', vim.lsp.buf.format, '[C]ode [F]ormat') -- WARN: This is not Goto Definition, this is Goto Declaration. -- For example, in C this would take you to the header. @@ -59,13 +60,13 @@ local capabilities = require('cmp_nvim_lsp').default_capabilities() require('mason').setup({}) require('mason-lspconfig').setup({ - ensure_installed = {'lua_ls', 'pyright', 'rust_analyzer', 'clangd', 'tsserver', }, + ensure_installed = {'lua_ls', 'pyright', 'rust_analyzer', 'clangd', 'ts_ls', }, handlers = { require('lspconfig').clangd.setup({ filetypes = { "c", "cpp", "objc", "objcpp", "cuda", "proto","hpp"}, capabilities = capabilities, }), - require('lspconfig').tsserver.setup({ + require('lspconfig').ts_ls.setup({ init_options = { plugins = { { diff --git a/after/plugin/whichkey.lua b/after/plugin/whichkey.lua index f1e9427..1d10286 100644 --- a/after/plugin/whichkey.lua +++ b/after/plugin/whichkey.lua @@ -1,8 +1,13 @@ -- Document existing key chains -require('which-key').register { - ['f'] = { name = '[F]ind', _ = 'which_key_ignore' }, - ['s'] = { name = '[S]earch', _ = 'which_key_ignore' }, - ['w'] = { name = '[W]orkspace', _ = 'which_key_ignore' }, - ['t'] = { name = '[T]oggle', _ = 'which_key_ignore' }, - ['h'] = { name = 'Git [H]unk', _ = 'which_key_ignore' }, +require('which-key').add { + { "f", group = "[F]ind" }, + { "f_", hidden = true }, + { "h", group = "Git [H]unk" }, + { "h_", hidden = true }, + { "s", group = "[S]earch" }, + { "s_", hidden = true }, + { "t", group = "[T]oggle" }, + { "t_", hidden = true }, + { "w", group = "[W]orkspace" }, + { "w_", hidden = true }, } diff --git a/lua/pippy/lazy.lua b/lua/pippy/lazy.lua index 58b71b2..3baec4c 100644 --- a/lua/pippy/lazy.lua +++ b/lua/pippy/lazy.lua @@ -51,6 +51,7 @@ require("lazy").setup({ {'xiyaowong/transparent.nvim'}, { 'numToStr/Comment.nvim', opts = {} }, { 'mg979/vim-visual-multi' }, + { 'xorid/asciitree.nvim' }, { 'stevearc/aerial.nvim', opts = {},