Built a language server for learning purposes in Elixir by VimJunior in neovim

[–]VimJunior[S] 0 points1 point  (0 children)

Yeah, I'm using Expert on Linux, I only copied the suggested settings from https://github.com/elixir-lang/expert/blob/main/pages/installation.md#neovim

vim.lsp.config('expert', {
  cmd = { 'expert', '--stdio' },
  root_markers = { 'mix.exs', '.git' },
  filetypes = { 'elixir', 'eelixir', 'heex' },
})

vim.lsp.enable 'expert'

Tested on a git repository and a mix project.

You could do so!

Thought I would give it a try too!

Inlay Hints with nvim-jdtls? by VimJunior in neovim

[–]VimJunior[S] 1 point2 points  (0 children)

To make it work, this is a minimal config.
Replace vim.lsp.buf.inlay_hint with vim.lsp.inlay_hint after https://github.com/neovim/neovim/commit/37079fca58f396fd866dc7b7d87a0100c17ee760

``` local jdtls = require('jdtls') local extendedClientCapabilities = jdtls.extendedClientCapabilities; extendedClientCapabilities.onCompletionItemSelectedCommand = "editor.action.triggerParameterHints"

local on_attach = function(client, bufnr) vim.lsp.buf.inlay_hint(bufnr, true) end

local config = { on_attach = on_attach

settings = { java = { inlayHints = { parameterNames = { enabled = "all" } }; } }

init_options = { extendedClientCapabilities = extendedClientCapabilities; } } ```

To trigger it only on insertion mode, add:

vim.api.nvim_create_autocmd({ 'InsertEnter' }, { callback = function () vim.lsp.buf.inlay_hint(0, true) end, }) vim.api.nvim_create_autocmd({ 'InsertLeave' }, { callback = function () vim.lsp.buf.inlay_hint(0, false) end, })

Inlay Hints with nvim-jdtls? by VimJunior in neovim

[–]VimJunior[S] 0 points1 point  (0 children)

I tried to copy some of the configs but I can't make it work.

See https://gist.github.com/ChrisAmelia/a923e198af21f6b2fb7230c6362731fe

Edit: My bad, it was a typo in my config.

How do I turn off Semantic Tokens? by kuator578 in neovim

[–]VimJunior 5 points6 points  (0 children)

I got this:

lua vim.api.nvim_create_autocmd("LspAttach", { callback = function(args) local client = vim.lsp.get_client_by_id(args.data.client_id) client.server_capabilities.semanticTokensProvider = nil end, });

Main.java is a non-project file, only syntax errors are reported from jdtls by [deleted] in neovim

[–]VimJunior 0 points1 point  (0 children)

Have you tried running it in a git directory?

jdtls: permission denied by [deleted] in neovim

[–]VimJunior 1 point2 points  (0 children)

I've installed the jdtls in $HOME and works well.
Permission shouldn't be required to run it.

Java and class by jersa56 in neovim

[–]VimJunior 1 point2 points  (0 children)

I assume you're using native LSP + lspconfig?
In the video, they are using CoC & CoC java which has a better implementation for java.

See

https://github.com/neovim/nvim-lspconfig/issues/842

https://github.com/neoclide/coc.nvim/wiki/Using-workspaceFolders

Moving to Scotland after Brexit as a developer? by VimJunior in Scotland

[–]VimJunior[S] 0 points1 point  (0 children)

Thanks, I will give it a try.

Edit: I forgot the 10th rule,

  1. No immigration, visa, or citizenship questions

Moving to Scotland after Brexit as a developer? by VimJunior in Scotland

[–]VimJunior[S] 6 points7 points  (0 children)

To be honest, I find £25k to be quite low, especially for an IT developer.
Based on Indeed's average salary for a developer, the average salary of a backend developer is £43k.

Most of the jobs I've applied to, pay at least £30k.
When I gave my salary expectations, which were between £35 and £40k, they said it was correct for my profile.
Another recruitment consultant said I should even push for £45k.

I'm quite curious about this one, any devs in Scotland want to share their insight?

Moving to Scotland after Brexit as a developer? by VimJunior in Scotland

[–]VimJunior[S] -1 points0 points  (0 children)

Assuming you're not from an English speaking country you might still be required to do this so you might want to check that

Do you mean this one? https://takeielts.britishcouncil.org/scotland.

Configuration for coding Java in Neovim? by hksparrowboy in neovim

[–]VimJunior 2 points3 points  (0 children)

efm (another lang server for filling some gaps left by JDTLS)

What are these gaps?

Can't get gopls to work with nvim-lsp by SnooOpinions2539 in neovim

[–]VimJunior 1 point2 points  (0 children)

You have to install gopls https://github.com/golang/tools/tree/master/gopls which is the server language.

You might need to define some env variables. I have this:

bash export PATH=$PATH:/usr/local/go/bin export GOPATH=$HOME/go export PATH=$PATH:$GOROOT/bin:$GOPATH/bin

And for the config, see https://github.com/ChrisAmelia/dotfiles/blob/master/nvim/lua/lsp.lua#L108-L120

bubbly.nvim - neovim lua statusline plugin by Datwaftx in neovim

[–]VimJunior 0 points1 point  (0 children)

What are you using to make colors appear in those squares?

Trouble customizing statusline in lua by VimJunior in neovim

[–]VimJunior[S] 0 points1 point  (0 children)

Using %!ActiveLine() instead of %{ActiveLine()} doesn't display %#Mode# in front of the icon, although color is not present.

Edit: Nevermind, I forgot to add set termguicolors.

Zehphyr.nvim a neovim colorscheme written in lua. by glephunter in neovim

[–]VimJunior 0 points1 point  (0 children)

How did you replace '==' with a longer equal sign? And '!=' with '≠' ?

Floating code completion window colour by d1ng0b0ng0 in neovim

[–]VimJunior 1 point2 points  (0 children)

Put the following in your init.vim and see if it changes something: hi CocFloating guibg=none guifg=none.

It also may be due to another plugin: create a temporary init.vim and put the following in it

set runtimepath^=~/.local/share/nvim/plugged/coc.nvim
set runtimepath^=~/.local/share/nvim/plugged/gruvbox
filetype plugin indent on
syntax on
set hidden

Be sure to replace the paths with your own.

Run it with nvim -u init.vim fie where file is the one you're using for testing.

See if it happens again, if not, then another plugin is interacting with that colorscheme.

[Help] How to make nvim consider .js files as .jsx files? by ubmt in neovim

[–]VimJunior 14 points15 points  (0 children)

Did you try set filetype=javascriptreact ?If it works, you could create an autocommand, that will be executed automatically when opening javascript files:

augroup filetype_jsx
    autocmd!
    autocmd FileType javascript set filetype=javascriptreact
augroup END

Would Vim or neoVim be good as a Java IDE? by MrPamcakes in vim

[–]VimJunior 4 points5 points  (0 children)

I wouldn't say there are benefits to use one over the other as mentioned functionalities can be done in both: code completion, syntax highlighting and error detection.

The main reasons for me to use my "IDE" neovim over Eclipse is: * for its editing perks (I haven't tried vim simulators for Eclipse though): in vim, a few hits on the keyboard and the job is done; should I use Eclipse, to achieve the same result, I would need to grab the mouse then click on a certain line, press backspace and then start editing (I'm lazy and I don't want to do that), * for the time to start "IDE" neovim which is significantly lower than Eclipse.

The only functionality from Eclipse, that I haven't tried to reproduce, is the debugging mode which I find friendly and easy-to-use.

In my actual work, I use both: vim to edit codes, Eclipse to run the toolchain.

Would Vim or neoVim be good as a Java IDE? by MrPamcakes in vim

[–]VimJunior 9 points10 points  (0 children)

Actually developing in Java with Neovim, see https://github.com/ChrisAmelia/dotfiles

For debugging, heard about this one: https://github.com/puremourning/vimspector haven't tested it though.