diff --git a/Hello.java b/Hello.java new file mode 100644 index 0000000..e69de29 diff --git a/init.lua b/init.lua index 0bc14a9..d6421c7 100644 --- a/init.lua +++ b/init.lua @@ -2,17 +2,7 @@ require("config.lazy") require("config.set") require("config.remap") -vim.api.nvim_create_autocmd('LspAttach', { - callback = function(ev) - local client = vim.lsp.get_client_by_id(ev.data.client_id) - if client:supports_method('textDocument/completion') then - vim.lsp.completion.enable(true, client.id, ev.buf, { autotrigger = true }) - end - end, -}) - -vim.lsp.enable({'basedpyright', 'lua_ls', 'yamlls', 'gopls', 'htmx', 'jsonls' }) - vim.cmd("set completeopt+=noselect") +vim.lsp.enable({'basedpyright', 'lua_ls', 'yamlls', 'gopls', 'htmx', 'jsonls' }) vim.o.winborder='rounded' diff --git a/lua/config/remap.lua b/lua/config/remap.lua index dcf7d90..cb8a0cf 100644 --- a/lua/config/remap.lua +++ b/lua/config/remap.lua @@ -1,6 +1,2 @@ vim.keymap.set("n", "pv", vim.cmd.Ex) -vim.keymap.set({ 'n', 'x' }, 'f', - function() vim.lsp.buf.format({ async = true }) end, - { buffer = bufnr, desc = "LSP: format buffer" } -) diff --git a/lua/plugins/completion.lua b/lua/plugins/completion.lua new file mode 100644 index 0000000..cc53298 --- /dev/null +++ b/lua/plugins/completion.lua @@ -0,0 +1,13 @@ +return { + 'saghen/blink.cmp', + dependencies = { 'rafamadriz/friendly-snippets' }, + version = '1.*', + + opts = { + keymap = { preset = 'default' }, + appearance = { + nerd_font_variant = 'mono' + }, + signature = { enabled = true } + }, +} diff --git a/lua/plugins/lsp.lua b/lua/plugins/lsp.lua index d429af8..1741606 100644 --- a/lua/plugins/lsp.lua +++ b/lua/plugins/lsp.lua @@ -1,9 +1,11 @@ return { - { "neovim/nvim-lspconfig" }, + { + "neovim/nvim-lspconfig", + dependencies = { + "saghen/blink.cmp" + } + }, { "nvim-treesitter/nvim-treesitter", build = ":TSUpdate" }, - { "hrsh7th/cmp-buffer"}, - { "hrsh7th/nvim-cmp" }, - { "hrsh7th/cmp-nvim-lsp" }, { "mfussenegger/nvim-jdtls" } -- jdtls bindings for neovim } diff --git a/lua/plugins/util.lua b/lua/plugins/util.lua index 6ae9445..01549d1 100644 --- a/lua/plugins/util.lua +++ b/lua/plugins/util.lua @@ -12,16 +12,16 @@ return { end, }, { - "nvim-telescope/telescope.nvim", - dependencies = {"nvim-lua/plenary.nvim"}, - config = function() - local builtin = require('telescope.builtin') - vim.keymap.set('n', 'pf', builtin.find_files, {}) - vim.keymap.set('n', '', builtin.git_files, {}) - vim.keymap.set('n', 'ps', function() - builtin.grep_string({ search = vim.fn.input("Grep > ") }); - end) - end, + "nvim-telescope/telescope.nvim", + dependencies = {"nvim-lua/plenary.nvim"}, + config = function() + local builtin = require('telescope.builtin') + vim.keymap.set('n', 'pf', builtin.find_files, {}) + vim.keymap.set('n', '', builtin.git_files, {}) + vim.keymap.set('n', 'ps', function() + builtin.grep_string({ search = vim.fn.input("Grep > ") }); + end) + end, }, { "theprimeagen/harpoon",