diff --git a/plugin/config.vim b/plugin/config.vim index 985be7e..c384b4b 100644 --- a/plugin/config.vim +++ b/plugin/config.vim @@ -10,7 +10,7 @@ set fileformats=unix,dos,mac set listchars=tab:▒░,trail:∞ set backspace=indent,eol,start set completeopt=menuone,longest,preview -set tabstop=4 softtabstop=0 expandtab shiftwidth=4 +set tabstop=2 softtabstop=0 expandtab shiftwidth=2 set list showmatch showmode shiftround ttimeout hidden showcmd hlsearch smartcase nobackup nowritebackup noswapfile termguicolors cursorline lazyredraw nowrap autoindent smarttab incsearch relativenumber number expandtab tnoremap @@ -31,8 +31,22 @@ endif lua << EOF require("bufferline").setup{ + options = { numbers = "buffer_id", - number_style = "superscript" + number_style = "superscript", + show_buffer_icons = false + } +} + +require('lualine').setup{ + sections = { + lualine_x = { + { + 'filetype', + colored = false, + } + } + } } require('mason').setup() @@ -40,14 +54,16 @@ require('mason').setup() require('mason-lspconfig').setup({ ensure_installed = { -- Replace these with whatever servers you want to install + -- 'standardrb', + 'solargraph', 'tsserver', 'quick_lint_js', - 'intelephense', 'html', } }) local lspconfig = require('lspconfig') + require('mason-lspconfig').setup_handlers({ function(server_name) lspconfig[server_name].setup({ @@ -102,27 +118,16 @@ cmp.setup.cmdline({ '/', '?' }, { } }) --- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore). -cmp.setup.cmdline(':', { - mapping = cmp.mapping.preset.cmdline(), - sources = cmp.config.sources({ - { name = 'path' } - }, { - { name = 'cmdline' } - }) -}) - -- Set up lspconfig. local capabilities = require('cmp_nvim_lsp').default_capabilities() require('lspconfig')['tsserver'].setup { capabilities = capabilities } require('lspconfig')['quick_lint_js'].setup { capabilities = capabilities } -require('lspconfig')['intelephense'].setup { capabilities = capabilities } require('lspconfig')['html'].setup { capabilities = capabilities } local opts = { noremap=true, silent=true } vim.keymap.set('n', 'e', vim.diagnostic.open_float, opts) -vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, opts) -vim.keymap.set('n', ']d', vim.diagnostic.goto_next, opts) +-- vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, opts) +-- vim.keymap.set('n', ']d', vim.diagnostic.goto_next, opts) vim.keymap.set('n', 'q', vim.diagnostic.setloclist, opts) local on_attach = function(client, bufnr) @@ -150,9 +155,23 @@ require('lspconfig')['pyright'].setup{ on_attach = on_attach, flags = lsp_flags, } + require('lspconfig')['tsserver'].setup{ on_attach = on_attach, flags = lsp_flags, } +-- vim.api.nvim_create_autocmd("FileType", { +-- pattern = "ruby", +-- group = vim.api.nvim_create_augroup("RubyLSP", { clear = true }), -- also this is not /needed/ but it's good practice +-- callback = function() +-- vim.lsp.start { +-- name = "standard", +-- cmd = { os.getenv( "HOME" ) .. "/.rbenv/shims/standardrb", "--lsp" }, +-- } +-- end, +-- }) + +require('lspconfig')['solargraph'].setup{} + EOF