diff --git a/home/.config/nvim/ftplugin/java.lua b/home/.config/nvim/ftplugin/java.lua index d5528a1..956c2cb 100644 --- a/home/.config/nvim/ftplugin/java.lua +++ b/home/.config/nvim/ftplugin/java.lua @@ -17,4 +17,4 @@ require('jdtls').start_or_attach({ } }) -require('plugins.lsp').lsp_map_keys('jdtls', nil) +require('plugins.lspconfig').lsp_map_keys('jdtls', nil) diff --git a/home/.config/nvim/lua/plugins/bufferline.lua b/home/.config/nvim/lua/plugins/bufferline.lua deleted file mode 100644 index c8834f1..0000000 --- a/home/.config/nvim/lua/plugins/bufferline.lua +++ /dev/null @@ -1 +0,0 @@ -require('bufferline').setup{} diff --git a/home/.config/nvim/lua/plugins/cmp.lua b/home/.config/nvim/lua/plugins/cmp.lua new file mode 100644 index 0000000..51a00cf --- /dev/null +++ b/home/.config/nvim/lua/plugins/cmp.lua @@ -0,0 +1,68 @@ +return function() + -- Setup git completion source + require("cmp_git").setup() + + -- Set completeopt to have a better completion experience + vim.o.completeopt = 'menuone,noselect' + + -- luasnip setup + local luasnip = require 'luasnip' + + -- nvim-cmp setup + local cmp = require 'cmp' + cmp.setup { + snippet = { + expand = function(args) + require('luasnip').lsp_expand(args.body) + end, + }, + mapping = { + [''] = cmp.mapping.select_prev_item(), + [''] = cmp.mapping.select_next_item(), + [''] = cmp.mapping.scroll_docs(-4), + [''] = cmp.mapping.scroll_docs(4), + [''] = cmp.mapping.complete(), + [''] = cmp.mapping.close(), + [''] = cmp.mapping.confirm { + behavior = cmp.ConfirmBehavior.Replace, + select = true, + }, + [''] = function(fallback) + if cmp.visible() then + cmp.select_next_item() + elseif luasnip.expand_or_jumpable() then + luasnip.expand_or_jump() + else + fallback() + end + end, + [''] = function(fallback) + if cmp.visible() then + cmp.select_prev_item() + elseif luasnip.jumpable(-1) then + luasnip.jump(-1) + else + fallback() + end + end, + }, + sources = { + { name = 'nvim_lsp' }, + { name = 'luasnip' }, + { name = 'path' }, + { name = 'git' }, + { name = 'buffer' }, + }, + } + + -- Enable autopairs when enter is processed + -- on completion + local cmp_autopairs = require 'nvim-autopairs.completion.cmp' + cmp.event:on( + 'confirm_done', + cmp_autopairs.on_confirm_done() + ) + + -- load friendly-snippets to luasnip + require('luasnip/loaders/from_vscode').lazy_load() +end diff --git a/home/.config/nvim/lua/plugins/colorscheme.lua b/home/.config/nvim/lua/plugins/colorscheme.lua index 9dfe8d6..3c09838 100644 --- a/home/.config/nvim/lua/plugins/colorscheme.lua +++ b/home/.config/nvim/lua/plugins/colorscheme.lua @@ -1,49 +1,51 @@ -require('catppuccin').setup({ - transparent_background = false, - term_colors = false, - compile = {enabled = true, path = vim.fn.stdpath 'cache' .. '/catppuccin'}, - styles = { - comments = {'italic'}, - functions = {'italic'}, - keywords = {'italic'}, - strings = {}, - variables = {} - }, - integrations = { - treesitter = true, - native_lsp = { - enabled = true, - virtual_text = { - errors = {'italic'}, - hints = {'italic'}, - warnings = {'italic'}, - information = {'italic'} - }, - underlines = { - errors = {'underline'}, - hints = {'underline'}, - warnings = {'underline'}, - information = {'underline'} - } - }, - lsp_trouble = false, - lsp_saga = false, - gitgutter = true, - gitsigns = false, - telescope = true, - nvimtree = {enabled = false, show_root = false}, - which_key = false, - indent_blankline = {enabled = true, colored_indent_levels = false}, - dashboard = false, - neogit = false, - vim_sneak = false, - fern = false, - barbar = false, - bufferline = false, - markdown = false, - lightspeed = false, - ts_rainbow = false, - hop = false - } -}) -vim.cmd [[colorscheme catppuccin]] +return function () + require('catppuccin').setup({ + transparent_background = false, + term_colors = false, + compile = {enabled = true, path = vim.fn.stdpath 'cache' .. '/catppuccin'}, + styles = { + comments = {'italic'}, + functions = {'italic'}, + keywords = {'italic'}, + strings = {}, + variables = {} + }, + integrations = { + treesitter = true, + native_lsp = { + enabled = true, + virtual_text = { + errors = {'italic'}, + hints = {'italic'}, + warnings = {'italic'}, + information = {'italic'} + }, + underlines = { + errors = {'underline'}, + hints = {'underline'}, + warnings = {'underline'}, + information = {'underline'} + } + }, + lsp_trouble = false, + lsp_saga = false, + gitgutter = true, + gitsigns = false, + telescope = true, + nvimtree = {enabled = false, show_root = false}, + which_key = false, + indent_blankline = {enabled = true, colored_indent_levels = false}, + dashboard = false, + neogit = false, + vim_sneak = false, + fern = false, + barbar = false, + bufferline = false, + markdown = false, + lightspeed = false, + ts_rainbow = false, + hop = false + } + }) + vim.cmd [[colorscheme catppuccin]] +end diff --git a/home/.config/nvim/lua/plugins/completion.lua b/home/.config/nvim/lua/plugins/completion.lua deleted file mode 100644 index 06b0102..0000000 --- a/home/.config/nvim/lua/plugins/completion.lua +++ /dev/null @@ -1,67 +0,0 @@ --- Add additional capabilities supported by nvim-cmp -local capabilities = vim.lsp.protocol.make_client_capabilities() -capabilities = require('cmp_nvim_lsp').update_capabilities(capabilities) --- --- Set completeopt to have a better completion experience -vim.o.completeopt = 'menuone,noselect' - --- luasnip setup -local luasnip = require 'luasnip' - --- nvim-cmp setup -local cmp = require 'cmp' -cmp.setup { - snippet = { - expand = function(args) - require('luasnip').lsp_expand(args.body) - end, - }, - mapping = { - [''] = cmp.mapping.select_prev_item(), - [''] = cmp.mapping.select_next_item(), - [''] = cmp.mapping.scroll_docs(-4), - [''] = cmp.mapping.scroll_docs(4), - [''] = cmp.mapping.complete(), - [''] = cmp.mapping.close(), - [''] = cmp.mapping.confirm { - behavior = cmp.ConfirmBehavior.Replace, - select = true, - }, - [''] = function(fallback) - if cmp.visible() then - cmp.select_next_item() - elseif luasnip.expand_or_jumpable() then - luasnip.expand_or_jump() - else - fallback() - end - end, - [''] = function(fallback) - if cmp.visible() then - cmp.select_prev_item() - elseif luasnip.jumpable(-1) then - luasnip.jump(-1) - else - fallback() - end - end, - }, - sources = { - { name = 'nvim_lsp' }, - { name = 'luasnip' }, - { name = 'path' }, - { name = 'git' }, - { name = 'buffer' }, - }, -} - --- Enable autopairs when enter is processed --- on completion -local cmp_autopairs = require 'nvim-autopairs.completion.cmp' -cmp.event:on( - 'confirm_done', - cmp_autopairs.on_confirm_done() -) - --- load friendly-snippets to luasnip -require('luasnip/loaders/from_vscode').lazy_load() diff --git a/home/.config/nvim/lua/plugins/indent-blankline.lua b/home/.config/nvim/lua/plugins/indent-blankline.lua index 1adbce2..1056ad0 100644 --- a/home/.config/nvim/lua/plugins/indent-blankline.lua +++ b/home/.config/nvim/lua/plugins/indent-blankline.lua @@ -1,7 +1,8 @@ -vim.opt.list = true - -require('indent_blankline').setup { - space_char_blankline = ' ', - show_current_context = true, - show_current_context_start = true, -} +return function () + vim.opt.list = true + require('indent_blankline').setup { + space_char_blankline = ' ', + show_current_context = true, + show_current_context_start = true, + } +end diff --git a/home/.config/nvim/lua/plugins/init.lua b/home/.config/nvim/lua/plugins/init.lua index 1ef36a4..b4622ad 100644 --- a/home/.config/nvim/lua/plugins/init.lua +++ b/home/.config/nvim/lua/plugins/init.lua @@ -3,157 +3,183 @@ local fn = vim.fn -- Install packer if it's not yet installed local install_path = fn.stdpath('data') .. '/site/pack/packer/opt/packer.nvim' if fn.empty(fn.glob(install_path)) > 0 then - print('Installing Packer') - Packer_bootstrap = fn.system({ - 'git', 'clone', '--depth', '1', - 'https://github.com/wbthomason/packer.nvim', install_path - }) - vim.o.runtimepath = vim.fn.stdpath('data') .. '/site/pack/*/start/*,' .. - vim.o.runtimepath - print('Installed Packer') + print('Installing Packer') + Packer_bootstrap = fn.system({ + 'git', 'clone', '--depth', '1', + 'https://github.com/wbthomason/packer.nvim', install_path + }) + vim.o.runtimepath = vim.fn.stdpath('data') .. '/site/pack/*/start/*,' .. + vim.o.runtimepath + print('Installed Packer') end -- Configure packer vim.cmd [[packadd packer.nvim]] require('packer').startup(function() - local use = require('packer').use + local use = require('packer').use - -- The plugin manager itself - use {'wbthomason/packer.nvim', opt = true} + -- The plugin manager itself + use { 'wbthomason/packer.nvim', opt = true } - -- Colorscheme - use({'catppuccin/nvim', as = 'catppuccin'}) + -- Colorscheme + use { + 'catppuccin/nvim', + as = 'catppuccin', + config = require('plugins.colorscheme'), + } - -- Git in signcolumn - use 'airblade/vim-gitgutter' + -- Git in signcolumn + use 'airblade/vim-gitgutter' - -- Statusline - use { - 'hoob3rt/lualine.nvim', - requires = {'kyazdani42/nvim-web-devicons', opt = true} - } + -- Statusline + use { + 'hoob3rt/lualine.nvim', + requires = { 'kyazdani42/nvim-web-devicons', opt = true }, + config = function() + require('lualine').setup { + options = { theme = 'catppuccin' } + } + end, + } - -- Tabline/bufferline - use { - 'akinsho/nvim-bufferline.lua', - tag = '*', - requires = 'kyazdani42/nvim-web-devicons' - } + -- Tabline/bufferline + use { + 'akinsho/nvim-bufferline.lua', + tag = '*', + requires = 'kyazdani42/nvim-web-devicons', + config = function() require('bufferline').setup {} end + } - -- Git commands - use 'tpope/vim-fugitive' + -- Git commands + use 'tpope/vim-fugitive' - -- Indent characters - use 'lukas-reineke/indent-blankline.nvim' + -- Indent characters + use { + 'lukas-reineke/indent-blankline.nvim', + config = require('plugins.indent-blankline') + } - -- Tree explorer - use {'kyazdani42/nvim-tree.lua', requires = 'kyazdani42/nvim-web-devicons'} + -- Tree explorer + use { + 'kyazdani42/nvim-tree.lua', + requires = 'kyazdani42/nvim-web-devicons', + config = function() require('nvim-tree').setup {} end + } - -- Telescope - use { - 'nvim-telescope/telescope.nvim', - requires = {{'nvim-lua/plenary.nvim'}} - } - use {'nvim-telescope/telescope-fzf-native.nvim', run = 'make'} -- Use fzf for fuzzy finder - use {'nvim-telescope/telescope-ui-select.nvim'} -- Replace vim built in select with telescope + -- Telescope + use { + 'nvim-telescope/telescope.nvim', + config = require('plugins.telescope'), + requires = { + { 'nvim-lua/plenary.nvim' }, -- Internal dep for telescope + { 'nvim-telescope/telescope-fzf-native.nvim', run = 'make' }, -- Use fzf for fuzzy finder + { 'nvim-telescope/telescope-ui-select.nvim' } -- Replace vim built in select with telescope + } + } - -- Do stuff as sudo - use 'lambdalisue/suda.vim' + -- Do stuff as sudo + use 'lambdalisue/suda.vim' -- Display possible keybinds use { 'folke/which-key.nvim', - config = function() - require('which-key').setup {} - end + config = function() require('which-key').setup {} end } -- Read editorconfig settings use 'editorconfig/editorconfig-vim' - -- Configs for built-in LSP - use 'neovim/nvim-lspconfig' - - -- Install LSP server executables - use {'williamboman/mason.nvim', 'williamboman/mason-lspconfig.nvim'} - - -- Additional LSP features for Java - use 'mfussenegger/nvim-jdtls' - - -- Display function signature - use {'ray-x/lsp_signature.nvim'} - - -- Completion - use 'hrsh7th/nvim-cmp' -- Autocompletion plugin - use 'hrsh7th/cmp-nvim-lsp' -- LSP source for nvim-cmp - use 'hrsh7th/cmp-path' -- Path source for nvim-cmp - use 'petertriho/cmp-git' -- Git source for nvim-cmp - use 'hrsh7th/cmp-buffer' -- Buffer source for nvim-cmp - use 'saadparwaiz1/cmp_luasnip' -- Snippets source for nvim-cmp - use 'L3MON4D3/LuaSnip' -- Snippets plugin - use 'rafamadriz/friendly-snippets' -- Snippets collection - -- Enable brackets for completions + -- Install LSP server executables use { - 'windwp/nvim-autopairs', - config = function() require('nvim-autopairs').setup {} end + 'williamboman/mason.nvim', + config = function() require('mason').setup {} end + } + use { + 'williamboman/mason-lspconfig.nvim', + config = function() + require('mason-lspconfig').setup { automatic_installation = true } + end } - -- treesitter syntax highlight - use { - 'nvim-treesitter/nvim-treesitter', - run = function() - require('nvim-treesitter.install').update({with_sync = true}) - end - } + -- Configs for built-in LSP + use { + 'neovim/nvim-lspconfig', + config = require('plugins.lspconfig').setup + } - -- treesitter plugin for commentstring - use 'JoosepAlviste/nvim-ts-context-commentstring' + -- Additional LSP features for Java + use 'mfussenegger/nvim-jdtls' - -- Additional plugins for formats not supported - -- by treesitter - use 'jamespeapen/swayconfig.vim' + -- Display function signature + use 'ray-x/lsp_signature.nvim' - -- mappings for commenting in code - use 'tpope/vim-commentary' + -- Completion + use { + 'hrsh7th/nvim-cmp', + requires = { + { 'hrsh7th/cmp-nvim-lsp' }, -- LSP source + { 'hrsh7th/cmp-path' }, -- Path source + { 'petertriho/cmp-git', requires = "nvim-lua/plenary.nvim" }, -- Git source + { 'hrsh7th/cmp-buffer' }, -- Buffer source + { 'saadparwaiz1/cmp_luasnip' }, -- Snippets source + { 'L3MON4D3/LuaSnip' }, -- Snippets plugin + { 'rafamadriz/friendly-snippets' }, -- Snippets collection + }, + config = require('plugins.cmp'), + } - -- we all know this one - use 'tpope/vim-surround' + -- Automatic brackets + use { + 'windwp/nvim-autopairs', + config = function() require('nvim-autopairs').setup{} end + } - -- Formatter plugin - use 'sbdchd/neoformat' + -- treesitter + use { + 'nvim-treesitter/nvim-treesitter', + run = function() + require('nvim-treesitter.install').update({ with_sync = true }) + end, + config = require('plugins.treesitter') + } - -- Make editing passwords safer - use { - 'https://git.zx2c4.com/password-store', - rtp = 'contrib/vim/redact_pass.vim' - } + -- treesitter plugin for commentstring + use 'JoosepAlviste/nvim-ts-context-commentstring' - -- Neovim inside Firefox - use { - 'glacambre/firenvim', - run = function() vim.fn['firenvim#install'](0) end - } + -- Additional plugins for formats not supported + -- by treesitter + use 'jamespeapen/swayconfig.vim' - -- Vim <3 Asciidoctor - use 'habamax/vim-asciidoctor' + -- mappings for commenting in code + use 'tpope/vim-commentary' + + -- we all know this one + use 'tpope/vim-surround' + + -- Formatter plugin + use 'sbdchd/neoformat' + + -- Make editing passwords safer + use { + 'https://git.zx2c4.com/password-store', + rtp = 'contrib/vim/redact_pass.vim' + } + + -- Neovim inside Firefox + use { + 'glacambre/firenvim', + run = function() vim.fn['firenvim#install'](0) end + } + + -- Vim <3 Asciidoctor + use 'habamax/vim-asciidoctor' end) -- Sync plugins if Packer was just -- installed if Packer_bootstrap then - print('Syncing plugins') - require('packer').sync() - print('Synced') + print('Syncing plugins') + require('packer').sync() + print('Synced') end - --- Source configurations -require 'plugins/lualine' -require 'plugins/bufferline' -require 'plugins/lsp' -require 'plugins/completion' -require 'plugins/treesitter' -require 'plugins/indent-blankline' -require 'plugins/nvim-tree' -require 'plugins/colorscheme' -require 'plugins/telescope' diff --git a/home/.config/nvim/lua/plugins/lsp.lua b/home/.config/nvim/lua/plugins/lsp.lua deleted file mode 100644 index 631a53a..0000000 --- a/home/.config/nvim/lua/plugins/lsp.lua +++ /dev/null @@ -1,89 +0,0 @@ -local M = {} -local lspconfig = require('lspconfig'); --- - -M.lsp_map_keys = function(server, bufnr) - local function map_key(...) - -- Map to buffer if buffer number is supplied, - -- globally otherwise - if bufnr == nil then - vim.api.nvim_set_keymap(...) - else - vim.api.nvim_buf_set_keymap(bufnr, ...) - end - end - - local keymapOpts = {noremap = true, silent = true} - map_key('n', 'gD', 'lua vim.lsp.buf.declaration()', keymapOpts) - map_key('n', 'gd', 'lua vim.lsp.buf.definition()', keymapOpts) - map_key('n', 'K', 'lua vim.lsp.buf.hover()', keymapOpts) - map_key('n', 'gi', 'lua vim.lsp.buf.implementation()', keymapOpts) - map_key('n', '', 'lua vim.lsp.buf.signature_help()', - keymapOpts) - map_key('n', 'wa', 'lua vim.lsp.buf.add_workspace_folder()', - keymapOpts) - map_key('n', 'wr', - 'lua vim.lsp.buf.remove_workspace_folder()', keymapOpts) - map_key('n', 'wl', - 'lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))', - keymapOpts) - map_key('n', 'D', 'lua vim.lsp.buf.type_definition()', - keymapOpts) - map_key('n', 'rn', 'lua vim.lsp.buf.rename()', keymapOpts) - map_key('n', 'ca', 'lua vim.lsp.buf.code_action()', - keymapOpts) - map_key('n', 'gr', 'lua vim.lsp.buf.references()', keymapOpts) - map_key('n', 'e', - 'lua vim.lsp.diagnostic.show_line_diagnostics()', - keymapOpts) - map_key('n', '[d', 'lua vim.diagnostic.goto_prev()', keymapOpts) - map_key('n', ']d', 'lua vim.diagnostic.goto_next()', keymapOpts) - map_key('n', 'q', 'lua vim.diagnostic.set_loclist()', - keymapOpts) - map_key('n', 'f', 'lua vim.lsp.buf.formatting()', keymapOpts) -end - --- Add additional capabilities supported by nvim-cmp -local capabilities = vim.lsp.protocol.make_client_capabilities() -capabilities = require('cmp_nvim_lsp').update_capabilities(capabilities) - --- Setup LSP signature plugin -require('lsp_signature').setup() - --- Setup mason -require("mason").setup() -require("mason-lspconfig").setup({automatic_installation = true}) - --- LSP servers setup -lspconfig.tsserver.setup {{}, on_attach = M.lsp_map_keys} -lspconfig.yamlls.setup {{}, on_attach = M.lsp_map_keys} -lspconfig.jsonls.setup {{}, on_attach = M.lsp_map_keys} -lspconfig.html.setup {{}, on_attach = M.lsp_map_keys} -lspconfig.marksman.setup {{}, on_attach = M.lsp_map_keys} - -lspconfig.sumneko_lua.setup { - settings = { - Lua = { - runtime = { - -- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim) - version = 'LuaJIT', - -- Setup your lua path - path = vim.split(package.path, ';') - }, - diagnostics = { - -- Get the language server to recognize the `vim` global - globals = {'vim'} - }, - workspace = { - -- Make the server aware of Neovim runtime files - library = vim.api.nvim_get_runtime_file('', true) - }, - -- Do not send telemetry data containing a randomized but unique identifier - telemetry = {enable = false} - } - }, - on_attach = M.lsp_map_keys, - capabilities = capabilities -} - -return M diff --git a/home/.config/nvim/lua/plugins/lspconfig.lua b/home/.config/nvim/lua/plugins/lspconfig.lua new file mode 100644 index 0000000..5d64019 --- /dev/null +++ b/home/.config/nvim/lua/plugins/lspconfig.lua @@ -0,0 +1,103 @@ +local M = {} + +function lsp_map_keys(server, bufnr) + print('lsp_map_keys') + local function map_key(...) + -- Map to buffer if buffer number is supplied, + -- globally otherwise + if bufnr == nil then + vim.api.nvim_set_keymap(...) + else + vim.api.nvim_buf_set_keymap(bufnr, ...) + end + end + + local keymapOpts = { noremap = true, silent = true } + map_key('n', 'gD', 'lua vim.lsp.buf.declaration()', keymapOpts) + map_key('n', 'gd', 'lua vim.lsp.buf.definition()', keymapOpts) + map_key('n', 'K', 'lua vim.lsp.buf.hover()', keymapOpts) + map_key('n', 'gi', 'lua vim.lsp.buf.implementation()', keymapOpts) + map_key('n', '', 'lua vim.lsp.buf.signature_help()', + keymapOpts) + map_key('n', 'wa', 'lua vim.lsp.buf.add_workspace_folder()', + keymapOpts) + map_key('n', 'wr', + 'lua vim.lsp.buf.remove_workspace_folder()', keymapOpts) + map_key('n', 'wl', + 'lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))', + keymapOpts) + map_key('n', 'D', 'lua vim.lsp.buf.type_definition()', + keymapOpts) + map_key('n', 'rn', 'lua vim.lsp.buf.rename()', keymapOpts) + map_key('n', 'ca', 'lua vim.lsp.buf.code_action()', + keymapOpts) + map_key('n', 'gr', 'lua vim.lsp.buf.references()', keymapOpts) + map_key('n', 'e', + 'lua vim.lsp.diagnostic.show_line_diagnostics()', + keymapOpts) + map_key('n', '[d', 'lua vim.diagnostic.goto_prev()', keymapOpts) + map_key('n', ']d', 'lua vim.diagnostic.goto_next()', keymapOpts) + map_key('n', 'q', 'lua vim.diagnostic.set_loclist()', + keymapOpts) + map_key('n', 'f', 'lua vim.lsp.buf.format()', keymapOpts) +end + +M.on_attach = function(server, bufnr) + print('on_attach') + -- Setup lsp signature plugin + require('lsp_signature').setup {} + + -- Setup keybinds + lsp_map_keys(server, bufnr) +end + + +function M.setup() + local lspconfig = require('lspconfig') + + local capabilities = vim.lsp.protocol.make_client_capabilities() + + -- Common settings for all servers + local lsp_defaults = { + on_attach = M.on_attach, -- Common on_attach + capabilities = capabilities -- Add additional capabilities supported by nvim-cmp + } + + -- Set default config for all servers + --lspconfig.util.default_config = vim.tbl_deep_extend('force', lspconfig.util.default_config, lsp_defaults) + + -- Register capabilities to cmp.nvim + --require('cmp_nvim_lsp').update_capabilities(capabilities) + + -- LSP servers setup + --lspconfig.tsserver.setup {} + --lspconfig.yamlls.setup {} + --lspconfig.jsonls.setup {} + --lspconfig.html.setup {} + --lspconfig.marksman.setup {} + + --lspconfig.sumneko_lua.setup { + -- settings = { + -- Lua = { + -- runtime = { + -- -- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim) + -- version = 'LuaJIT', + -- -- Setup your lua path + -- path = vim.split(package.path, ';') + -- }, + -- diagnostics = { + -- -- Get the language server to recognize the `vim` global + -- globals = { 'vim' } + -- }, + -- workspace = { + -- -- Make the server aware of Neovim runtime files + -- library = vim.api.nvim_get_runtime_file('', true) + -- }, + -- -- Do not send telemetry data containing a randomized but unique identifier + -- telemetry = { enable = false } + -- } + -- } + --} +end + +return M diff --git a/home/.config/nvim/lua/plugins/nvim-tree.lua b/home/.config/nvim/lua/plugins/nvim-tree.lua index 81be0bf..e69de29 100644 --- a/home/.config/nvim/lua/plugins/nvim-tree.lua +++ b/home/.config/nvim/lua/plugins/nvim-tree.lua @@ -1 +0,0 @@ -require'nvim-tree'.setup {} diff --git a/home/.config/nvim/lua/plugins/src/main/java/fi/rossum/helen/serviceportal/api/cornerstone/CornerstoneServiceImpl.java b/home/.config/nvim/lua/plugins/src/main/java/fi/rossum/helen/serviceportal/api/cornerstone/CornerstoneServiceImpl.java new file mode 100644 index 0000000..e69de29 diff --git a/home/.config/nvim/lua/plugins/telescope.lua b/home/.config/nvim/lua/plugins/telescope.lua index 7124a2f..fc94b44 100644 --- a/home/.config/nvim/lua/plugins/telescope.lua +++ b/home/.config/nvim/lua/plugins/telescope.lua @@ -1,4 +1,6 @@ -local telescope = require('telescope') -telescope.setup {} -telescope.load_extension('fzf') -telescope.load_extension('ui-select') +return function () + local telescope = require('telescope') + telescope.setup {} + telescope.load_extension('fzf') + telescope.load_extension('ui-select') +end diff --git a/home/.config/nvim/lua/plugins/treesitter.lua b/home/.config/nvim/lua/plugins/treesitter.lua index b3abded..daeff0f 100644 --- a/home/.config/nvim/lua/plugins/treesitter.lua +++ b/home/.config/nvim/lua/plugins/treesitter.lua @@ -1,14 +1,16 @@ -require'nvim-treesitter.configs'.setup { - ensure_installed = { - 'bash', 'c', 'css', 'dockerfile', 'html', 'http', 'java', 'json', - 'json5', 'latex', 'lua', 'make', 'markdown', 'php', 'python', 'regex', - 'rst', 'scss', 'toml', 'tsx', 'typescript', 'javascript', 'yaml' - }, - highlight = {enable = true}, - indent = {enable = true}, - incremental_selection = {enable = true}, - context_commentstring = {enable = true} -} +return function () + require'nvim-treesitter.configs'.setup { + ensure_installed = { + 'bash', 'c', 'css', 'dockerfile', 'html', 'http', 'java', 'json', + 'json5', 'latex', 'lua', 'make', 'markdown', 'php', 'python', 'regex', + 'rst', 'scss', 'toml', 'tsx', 'typescript', 'javascript', 'yaml' + }, + highlight = {enable = true}, + indent = {enable = true}, + incremental_selection = {enable = true}, + context_commentstring = {enable = true} + } ---vim.wo.foldmethod = 'expr' ---im.wo.foldexpr = 'nvim_treesitter#foldexpr()' + --vim.wo.foldmethod = 'expr' + --im.wo.foldexpr = 'nvim_treesitter#foldexpr()' +end diff --git a/home/.config/nvim/lua/src/main/java/fi/rossum/helen/serviceportal/api/cornerstone/CornerstoneServiceImpl.java b/home/.config/nvim/lua/src/main/java/fi/rossum/helen/serviceportal/api/cornerstone/CornerstoneServiceImpl.java new file mode 100644 index 0000000..e69de29