mjlbach / starter.nvim Goto Github PK
View Code? Open in Web Editor NEWA small, documented, and featureful neovim starter config
License: MIT License
A small, documented, and featureful neovim starter config
License: MIT License
Pro vim-sleuth:
Con:
I think a modeline (or simply adding indentation configuration) would help demonstrate indent-blankline better because out-of-the-box, indent-blankline appears off:
So maybe just add the following to the bottom of the file:
-- vim: ts=2 sts=2 sw=2 et
or maybe the following options:
--Indentation settings
vim.opt.tabstop = 2
vim.opt.softtabstop = 2
vim.opt.shiftwidth = 2
-- and maybe also: vim.opt.expandtab = true
Just a thought. I love kickstart.nvim
Pro vim-vinegar:
Con:
Error detected while processing function gutentags#setup_gutentags[63]..gutentags#ctags#init:
line 25:
Executable 'ctags' can't be found. Gutentags will be disabled. You can re-enable it by setting g:gutentags_enabled back to 1.
Press ENTER or type command to continue
How do I fix this? I thought deleting this line would do it but no luck.
I guess the other option is to install ctags
.
https://nixos.wiki/wiki/Home_Manager
What are your thoughts about using Home Manager in this project?
I didn't work with it myself - just wondering is it suited here or prepared init.lua
is a better choice
Should probably make the doc comments more explicit and link to :help
when applicable
I have deleted everything that has the word tag
in it in the init.lua
file but I can't seem to stop this behavior. I really don't care whatever functionality it is supposed to provide. It just infuriates me :) What prompts nvim to generate this file, and how can I stop it?
I have a map for entering paste mode:
--Add map to enter paste mode
vim.o.pastetoggle="<F3>"
I have a map for toggling mouse mode and removing lines for copy/pasting
-- Toggle to disable mouse mode and indentlines for easier paste
ToggleMouse = function()
if vim.o.mouse == 'a' then
vim.cmd[[IndentBlanklineDisable]]
vim.wo.signcolumn='no'
vim.o.mouse = 'v'
vim.wo.number = false
print("Mouse disabled")
else
vim.cmd[[IndentBlanklineEnable]]
vim.wo.signcolumn='yes'
vim.o.mouse = 'a'
vim.wo.number = true
print("Mouse enabled")
end
end
vim.api.nvim_set_keymap('n', '<F10>', '<cmd>lua ToggleMouse()<cr>', { noremap = true })
Sumneko is currently only mapped for macos (this is ofc meant to be changed).
cmd = {sumneko_root_path.."/bin/macOS/lua-language-server", "-E", sumneko_root_path.."/main.lua" };
I don't like insert on completion by default
-- Set completeopt to have a better completion experience
vim.o.completeopt="menuone,noinsert,noselect"
Pro polyglot:
Con:
I've freed roughly 20 lines from the configuration which leaves just enough room for tree-sitter support. I'm not quite sure if this belongs yet (I don't use tree-sitter regularly), but up for discussion!
After launching:
Error detected while processing /home/yazu/var/nvim-repo/starter/config/nvim/init.lua:
You are trying to call the setup function of indent-blankline version 2, but you have version 3
installed.
Take a look at the GitHub wiki for instructions on how to migrate, or revert back to version 2.
It's possible to remove this message to change:
require('indent_blankline').setup {
to
require('ibl').setup {
But it's necessary to comment all lines within the block:
require('ibl').setup {
-- char = 'โ',
-- filetype_exclude = { 'help' },
-- buftype_exclude = { 'terminal', 'nofile' },
-- show_trailing_blankline_indent = false,
}
Does anyone know if there is any issues with auto-import on Windows 10?
Auto-import using defaults.nvim and like described on https://github.com/neovim/nvim-lspconfig/wiki/Autocompletion works great on Linux but when I try the exact same config on Windows 10 it doesn't work. I get the popup with "Auto import from ..." and documentation but when I press (tried with other mappings aswell) it only inserts the item but no import is inserted.
Any tips or how I can debug this further?
I would love to use this template.
When NIX_PATH=nixpkgs=http://nixos.org/channels/nixpkgs-unstable/nixexprs.tar.xz nix-shell
I'm getting
error: infinite recursion encountered, at /nix/store/2fry3p9f13z4icn9a973fwaj6n4hgnz1-source/contrib/flake.nix:98:18
This is my neovim overlay:
# file ~/.config/nixpkgs/overlays/neovim.nix
(import (builtins.fetchTarball {
url = https://github.com/nix-community/neovim-nightly-overlay/archive/master.tar.gz;
}))
Some language servers support, or even require, using snippet (and so does compe), we could add a basic snippets plugin. Not sure if this is "defaults" worthy.
Hey y'all! Thanks for making this. Wondering if it would be possible to add to the Wiki a walkthrough for beginners.
I'm super new to Neovim and it would help me a ton. Ideal walkthrough:
Other things I'm unsure about:
:PackerInstall
do? i'm using a container based environment so need to make sure whatever gets installed persists, or can be scripted in a install.sh
script.Let me know if you prefer questions elsewhere :)
Why is <Esc>
only set when the terminal is open through an autocommand as in here? Since it's anyway a buffer keymap couldn't it be set as normal?
Get build errors.
Neovim version (nvim -v)
NVIM v0.7.0
Build type: Release
LuaJIT 2.1.0-beta3
Note: checkhealth all green.
Language server name
lua-language-server 2.6.7-1
Operating system/version
Operating System: Manjaro Linux
Kernel: Linux 5.15.32-1-MANJARO
Architecture: x86-64
Steps to reproduce:
No ~/,local/share/nvim and ~/.config/nvim. Fresh NVIM v0.7 installation.
Create ~/.config/nvim/init.lua using init.lua from kickstart.nvim
Run nvim, ignore errors, close, run nvim again execute :PackerSync
Note: Make sure lua-language-server is found in $PATH.
Problem:
Multiple lua-language-servers clients are attached to the buffer. At opening the file, only one lua lsp server gets attached, but after a while (< 2 mins), duplicates are spawned. Found no limit to the number of clients spawned; only stops when the computer hangs.
Expected Behavior:
Only one lua lsp server is attached to the buffer
Pro vim-repeat:
Con:
It would be great to see this repo using the new syntax.
@mjlbach,
I plan to make a PR based on this blog post -
Installing neovim nightly alongside stable
The issue is that this installation uses the same directories - ~/.config, ~/.local as my existing neovim. So I cannot use them both. Probably they are conflicting because of the same NVIM_RPLUGIN_MANIFEST
. In the end, I decided to keep all generated files separate altogether.
I did so here - my nix-neovim - plugin files would be in the same directory as shell.nix
- inside local/
- I added the directory and generated file in my .gitignore
:
What do you think?
Also, I think - It is a good idea to add MYVIMRC
env - so you can open it as e: $MYVIMRC
as usual:
There are 43 keymaps in the configuration, comment on disagreements.
What about backup and swap files? I can't recall how many times Vim saved my arse because I accidentally rm -rf
ed system configurations.
I installed neovim with brew on MacOS and then followed the steps in the README. When open a *.py file, I'm hitting an error:
Spawning language server with cmd: `pyright-langserver` failed. The language server is either not installed, missing from PATH, or not executable.
I wasn't sure whether to open two issues for this, but ultimately I decided they were about the same thing: Snippets in this plug and play.
So, I tried setting up nvim-lsp yesterday for rust and took this as a reference and I found that I needed to take extra steps to enable Magic Completions from Rust-analyzer. Obviously, since this is supposed to be minimum I understand why you didn't include this extra functionality. However, I was a bit confused on the sources of nvim-compe (specifically lines 243 and 248 from the init.lua file.):
source = {
path = true;
buffer = false;
calc = true;
vsnip = false;
nvim_lsp = true;
nvim_lua = true;
spell = true;
tags = false;
snippets_nvim = true;
treesitter = true;
};
From what I gather from the readme of nvim-compe, to use snippets_nvim or vsnip, you must install the plugin as well. Neither are included in the packer setup, so I'm a bit confused on what these lines are doing. Is snippet support supposed to be enable? If so will magic completion be included as it is a nice feature from Rust-analyzer supported by nvim-compe. Otherwise, if there is no support for snippets, then shouldn't these lines be discarded? I was also under the impression that in order to expand snippets you need to included the following in your init.{lua,vim}:
inoremap <silent><expr> <CR> compe#confirm('<CR>')
`-- adding a map helper can be useful
local function map(mode, lhs, rhs, opts)
local options = {noremap = true}
if opts then options = vim.tbl_extend('force', options, opts) end
vim.api.nvim_set_keymap(mode, lhs, rhs, options)
end
map('', 'c', '"+y') -- Copy to clipboard in normal, visual, select and operator modes
map('i', '', 'u') -- Make undo-friendly
map('i', '', 'u') -- Make undo-friendly
-- to navigate the completion menu
map('i', '', 'pumvisible() ? "\" : "\"', {expr = true})
map('i', '', 'pumvisible() ? "\" : "\"', {expr = true})
-- source: https://oroques.dev/notes/neovim-init/
`
Once nvim comes up and I run
:PackerInstall
the required packages install and no problem after that.
Any way to automate that. (bootstrap/lazyinstall)?
-- Error message --
Error detected while processing /home/mallick1/.config/nvim/init.lua:
E5113: Error while calling lua chunk: /home/mallick1/.config/nvim/init.lua:76: Vim(colorscheme):E185: Cannot find color s
cheme 'onedark'
Press ENTER or type command to continue
I believe the problem in #21 is now reintroduced in 88b1216e22eeb56e33f3ca108a5244986f2b13a1
.
In nvim_cmp_lsp
, update_capabilities
only updates capabilities if the values in the table are nil. However, snippetSupport
, commitCharactersSupport
, deprecatedSupport
, and preselectSupport
are all by default false, so updating keeps these values. I'm not sure if this is desired behavior.
That was false information. I had snippetSupport to be overridden with false. Overridden is by default empty not false. Sorry for false reporting.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.