This commit is contained in:
adamdobos-seon
2026-05-23 20:53:03 +02:00
parent c68670809d
commit 39f422c132
3 changed files with 175 additions and 79 deletions

View File

@@ -30,3 +30,17 @@ vim.keymap.set("v", "K", ":m '<-2<CR>gv=gv")
-- Format
vim.keymap.set('n', '<space>f', function() vim.lsp.buf.format { async = true } end, bufopts)
-- Copilot
--vim.keymap.set('i', '<C-k>', 'copilot#Accept("\\<CR>")', {
-- expr = true,
-- replace_keycodes = false
--})
--vim.g.copilot_no_tab_map = true
-- vim.g.codeium_disable_bindings = 1
-- Windsurf
-- vim.keymap.set('i', '<C-k>', 'codeium#Accept()', {
-- expr = true,
-- silent = true
-- })

View File

@@ -30,90 +30,138 @@ end
local capabilities = require('cmp_nvim_lsp').default_capabilities(vim.lsp.protocol.make_client_capabilities())
require 'lspconfig'.clangd.setup {
vim.lsp.config('clangd', {
on_attach = on_attach,
capabilities = capabilities,
}
require 'lspconfig'.ts_ls.setup {
})
vim.lsp.enable('clangd')
vim.lsp.config('ts_ls', {
on_attach = on_attach,
capabilities = capabilities,
}
require 'lspconfig'.pyright.setup {
})
vim.lsp.enable('ts_ls')
vim.lsp.config('pyright', {
on_attach = on_attach,
capabilities = capabilities,
}
require 'lspconfig'.eslint.setup {
})
vim.lsp.enable('pyright')
vim.lsp.config('gopls', {
on_attach = on_attach,
capabilities = capabilities,
settings = {
format = false
},
}
require 'lspconfig'.rust_analyzer.setup {
})
vim.lsp.enable('gopls')
vim.lsp.config('rust_analyzer', {
on_attach = on_attach,
capabilities = capabilities,
cmd = {
"rustup", "run", "stable", "rust-analyzer",
},
}
require 'lspconfig'.phpactor.setup {
})
vim.lsp.enable('rust_analyzer')
vim.lsp.config('phpactor', {
on_attach = on_attach,
init_options = {
["language_server_phpstan.enabled"] = false,
["language_server_psalm.enabled"] = false,
}
}
require 'lspconfig'.asm_lsp.setup {
})
vim.lsp.enable('phpactor')
vim.lsp.config('asm_lsp', {
on_attach = on_attach,
capabilities = capabilities,
cmd = {
"/home/dobiadi/.cargo/bin/asm-lsp"
},
}
require 'lspconfig'.elixirls.setup {
})
vim.lsp.enable('asm_lsp')
vim.lsp.config('elixirls', {
on_attach = on_attach,
capabilities = capabilities,
cmd = {
"elixir-ls"
},
}
require'lspconfig'.terraformls.setup{
})
vim.lsp.enable('elixirls')
vim.lsp.config('terraformls', {
on_attach = on_attach,
capabilities = capabilities,
}
require 'lspconfig'.lua_ls.setup {
})
vim.lsp.enable('terraformls')
vim.lsp.enable('oxfmt')
vim.lsp.enable('oxlint')
vim.lsp.config("jdtls", {
on_attach = on_attach,
capabilities = capabilities,
cmd = {
'/home/adamdobos/Downloads/jdtls/bin/jdtls'
},
settings = {
java = {
configuration = {
runtimes = {
{
name = "JavaSE-17",
path = "/usr/lib/jvm/java-17-openjdk-amd64/",
},
{
name = "JavaSE-21",
path = "/usr/lib/jvm/java-21-openjdk-amd64/",
}
}
}
}
}
})
vim.lsp.enable("jdtls")
vim.lsp.config('lua_ls', {
on_attach = on_attach,
capabilities = capabilities,
on_init = function(client)
local path = client.workspace_folders[1].name
if vim.loop.fs_stat(path .. '/.luarc.json') or vim.loop.fs_stat(path .. '/.luarc.jsonc') then
return
if client.workspace_folders then
local path = client.workspace_folders[1].name
if
path ~= vim.fn.stdpath('config')
and (vim.uv.fs_stat(path .. '/.luarc.json') or vim.uv.fs_stat(path .. '/.luarc.jsonc'))
then
return
end
end
client.config.settings.Lua = vim.tbl_deep_extend('force', client.config.settings.Lua, {
runtime = {
-- Tell the language server which version of Lua you're using
-- (most likely LuaJIT in the case of Neovim)
version = 'LuaJIT'
-- Tell the language server which version of Lua you're using (most
-- likely LuaJIT in the case of Neovim)
version = 'LuaJIT',
-- Tell the language server how to find Lua modules same way as Neovim
-- (see `:h lua-module-load`)
path = {
'lua/?.lua',
'lua/?/init.lua',
},
},
-- Make the server aware of Neovim runtime files
workspace = {
checkThirdParty = false,
library = {
vim.env.VIMRUNTIME
-- Depending on the usage, you might want to add additional paths here.
-- "${3rd}/luv/library"
-- "${3rd}/busted/library",
}
-- or pull in all of 'runtimepath'. NOTE: this is a lot slower
-- library = vim.api.nvim_get_runtime_file("", true)
}
vim.env.VIMRUNTIME,
-- Depending on the usage, you might want to add additional paths
-- here.
-- '${3rd}/luv/library',
-- '${3rd}/busted/library',
},
-- Or pull in all of 'runtimepath'.
-- NOTE: this is a lot slower and will cause issues when working on
-- your own configuration.
-- See https://github.com/neovim/nvim-lspconfig/issues/3189
-- library = vim.api.nvim_get_runtime_file('', true),
},
})
end,
settings = {
Lua = {}
}
}
})
vim.lsp.enable('lua_ls')
vim.opt.completeopt = { "menu", "menuone", "noselect" }
-- Set up nvim-cmp.
@@ -165,8 +213,6 @@ vim.diagnostic.config({
require("null-ls").setup({
sources = {
-- JavaScript
require("null-ls").builtins.formatting.prettier,
-- Python
require("null-ls").builtins.formatting.black.with({ extra_args = { "--fast" } }),
require("null-ls").builtins.formatting.isort,
@@ -180,3 +226,18 @@ require("null-ls").setup({
require("null-ls").builtins.formatting.mix,
},
})
--require('avante').setup({
-- provider = "claude",
-- providers = {
-- claude = {
-- auth_type = "max"
-- }
-- },
-- selector = {
-- provider = "snacks"
-- },
-- input = {
-- provider = "snacks"
-- }
--})

View File

@@ -1,51 +1,72 @@
vim.cmd [[packadd packer.nvim]]
return require('packer').startup(function(use)
-- Package manager
use 'wbthomason/packer.nvim'
-- Package manager
use 'wbthomason/packer.nvim'
-- Theme
use 'folke/tokyonight.nvim'
-- Theme
use 'folke/tokyonight.nvim'
-- LSP
use 'neovim/nvim-lspconfig'
use {
'nvimtools/none-ls.nvim',
requires = { {'nvimtools/none-ls-extras.nvim'} }
}
-- LSP
use 'neovim/nvim-lspconfig'
use {
'nvimtools/none-ls.nvim',
requires = { { 'nvimtools/none-ls-extras.nvim' } }
}
-- Autocomplete
use 'hrsh7th/nvim-cmp'
use 'hrsh7th/cmp-nvim-lsp'
use 'hrsh7th/cmp-buffer'
use 'hrsh7th/cmp-path'
use 'hrsh7th/cmp-nvim-lsp-signature-help'
use ({
'L3MON4D3/LuaSnip',
-- follow latest release.
tag = "v2.*",
-- install jsregexp (optional!:).
run = "make install_jsregexp"
})
use 'saadparwaiz1/cmp_luasnip'
-- Autocomplete
use 'hrsh7th/nvim-cmp'
use 'hrsh7th/cmp-nvim-lsp'
use 'hrsh7th/cmp-buffer'
use 'hrsh7th/cmp-path'
use 'hrsh7th/cmp-nvim-lsp-signature-help'
use({
'L3MON4D3/LuaSnip',
-- follow latest release.
tag = "v2.*",
-- install jsregexp (optional!:).
run = "make install_jsregexp"
})
use 'saadparwaiz1/cmp_luasnip'
-- Telescope
use {
'nvim-telescope/telescope.nvim', tag = '0.1.6',
requires = { {'nvim-lua/plenary.nvim'} }
}
use 'nvim-treesitter/nvim-treesitter'
use 'nvim-treesitter/nvim-treesitter-context'
use 'kyazdani42/nvim-web-devicons'
use 'sharkdp/fd'
use 'BurntSushi/ripgrep'
-- Telescope
use {
'nvim-telescope/telescope.nvim', tag = '0.1.6',
requires = { { 'nvim-lua/plenary.nvim' } }
}
use 'nvim-treesitter/nvim-treesitter'
use 'nvim-treesitter/nvim-treesitter-context'
use 'kyazdani42/nvim-web-devicons'
use 'sharkdp/fd'
use 'BurntSushi/ripgrep'
-- Statusline
use 'nvim-lualine/lualine.nvim'
-- Statusline
use 'nvim-lualine/lualine.nvim'
-- Undotree
use 'mbbill/undotree'
-- Undotree
use 'mbbill/undotree'
-- Git
use 'tpope/vim-fugitive'
-- Git
use 'tpope/vim-fugitive'
-- Copilot
-- use 'github/copilot.vim'
-- Windsurf
-- use 'Exafunction/windsurf.vim'
-- jdtls
use 'mfussenegger/nvim-jdtls'
-- UI tools
use 'MunifTanjim/nui.nvim'
use 'MeanderingProgrammer/render-markdown.nvim'
use 'folke/snacks.nvim' -- for modern input UI
-- Avante
-- use {
-- 'yetone/avante.nvim',
-- branch = 'main',
-- run = 'make'
-- }
end)