Skip to content

Commit 07778f6

Browse files
committed
Merge 'upstream': docs, gitsigns, emoji, lsp
- fix: arguments for the `vim.lsp.Client.supports_method` method - Add a blurb about installing missing emoji on Ubuntu - fix (nvim-lua#1319): gitsigns deprecated functions - docs: clarify using opts = {} vs config = function() ... require('plu… - chore(docs): Update README.md
2 parents a0a5e06 + db78c0b commit 07778f6

4 files changed

Lines changed: 24 additions & 13 deletions

File tree

README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ External Requirements:
2929
- Clipboard tool (xclip/xsel/win32yank or other depending on the platform)
3030
- A [Nerd Font](https://www.nerdfonts.com/): optional, provides various icons
3131
- if you have it set `vim.g.have_nerd_font` in `init.lua` to true
32+
- Emoji fonts (Ubuntu only, and only if you want emoji!) `sudo apt install fonts-noto-color-emoji`
3233
- Language Setup:
3334
- If you want to write Typescript, you need `npm`
3435
- If you want to write Golang, you will need `go`
@@ -217,14 +218,14 @@ sudo apt update
217218
sudo apt install make gcc ripgrep unzip git xclip curl
218219
219220
# Now we install nvim
220-
curl -LO https://github.com/neovim/neovim/releases/latest/download/nvim-linux64.tar.gz
221-
sudo rm -rf /opt/nvim-linux64
222-
sudo mkdir -p /opt/nvim-linux64
223-
sudo chmod a+rX /opt/nvim-linux64
224-
sudo tar -C /opt -xzf nvim-linux64.tar.gz
221+
curl -LO https://github.com/neovim/neovim/releases/latest/download/nvim-linux-x86_64.tar.gz
222+
sudo rm -rf /opt/nvim-linux-x86_64
223+
sudo mkdir -p /opt/nvim-linux-x86_64
224+
sudo chmod a+rX /opt/nvim-linux-x86_64
225+
sudo tar -C /opt -xzf nvim-linux-x86_64.tar.gz
225226
226227
# make it available in /usr/local/bin, distro installs to /usr/bin
227-
sudo ln -sf /opt/nvim-linux64/bin/nvim /usr/local/bin/
228+
sudo ln -sf /opt/nvim-linux-x86_64/bin/nvim /usr/local/bin/
228229
```
229230
</details>
230231
<details><summary>Fedora Install Steps</summary>

lua/kickstart/plugins/gitsigns.lua

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
1+
-- Alternatively, use `config = function() ... end` for full control over the configuration.
2+
-- If you prefer to call `setup` explicitly, use:
3+
-- {
4+
-- 'lewis6991/gitsigns.nvim',
5+
-- config = function()
6+
-- require('gitsigns').setup({
7+
-- -- Your gitsigns configuration here
8+
-- })
9+
-- end,
10+
-- }
11+
--
112
-- Here is a more advanced example where we pass configuration
2-
-- options to `gitsigns.nvim`. This is equivalent to the following Lua:
3-
-- require('gitsigns').setup({ ... })
13+
-- options to `gitsigns.nvim`.
414
--
515
-- See `:help gitsigns` to understand what the configuration keys do
616
return {
@@ -52,7 +62,7 @@ return {
5262
map('n', '<leader>hs', gitsigns.stage_hunk, { desc = 'git [s]tage hunk' })
5363
map('n', '<leader>hr', gitsigns.reset_hunk, { desc = 'git [r]eset hunk' })
5464
map('n', '<leader>hS', gitsigns.stage_buffer, { desc = 'git [S]tage buffer' })
55-
map('n', '<leader>hu', gitsigns.undo_stage_hunk, { desc = 'git [u]ndo stage hunk' })
65+
map('n', '<leader>hu', gitsigns.stage_hunk, { desc = 'git [u]ndo stage hunk' })
5666
map('n', '<leader>hR', gitsigns.reset_buffer, { desc = 'git [R]eset buffer' })
5767
map('n', '<leader>hp', gitsigns.preview_hunk, { desc = 'git [p]review hunk' })
5868
map('n', '<leader>hb', gitsigns.blame_line, { desc = 'git [b]lame line' })
@@ -62,7 +72,7 @@ return {
6272
end, { desc = 'git [D]iff against last commit' })
6373
-- Toggles
6474
map('n', '<leader>tb', gitsigns.toggle_current_line_blame, { desc = '[T]oggle git show [b]lame line' })
65-
map('n', '<leader>tD', gitsigns.toggle_deleted, { desc = '[T]oggle git show [D]eleted' })
75+
map('n', '<leader>tD', gitsigns.preview_hunk_inline, { desc = '[T]oggle git show [D]eleted' })
6676
end,
6777
},
6878
},

lua/kickstart/plugins/lspconfig.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ return {
115115
--
116116
-- When you move your cursor, the highlights will be cleared (the second autocommand).
117117
local client = vim.lsp.get_client_by_id(event.data.client_id)
118-
if client and client.supports_method(vim.lsp.protocol.Methods.textDocument_documentHighlight) then
118+
if client and client:supports_method(vim.lsp.protocol.Methods.textDocument_documentHighlight) then
119119
local highlight_augroup = vim.api.nvim_create_augroup('kickstart-lsp-highlight', { clear = false })
120120
vim.api.nvim_create_autocmd({ 'CursorHold', 'CursorHoldI' }, {
121121
buffer = event.buf,
@@ -142,7 +142,7 @@ return {
142142
-- code, if the language server you are using supports them
143143
--
144144
-- This may be unwanted, since they displace some of your code
145-
if client and client.supports_method(vim.lsp.protocol.Methods.textDocument_inlayHint) then
145+
if client and client:supports_method(vim.lsp.protocol.Methods.textDocument_inlayHint) then
146146
map('<leader>th', function()
147147
vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled { bufnr = event.buf })
148148
end, '[T]oggle Inlay [H]ints')

lua/lazy-plugins.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ require('lazy').setup({
1717
-- with the first argument being the link and the following
1818
-- keys can be used to configure plugin behavior/loading/etc.
1919
--
20-
-- Use `opts = {}` to force a plugin to be loaded.
20+
-- Use `opts = {}` to automatically pass options to a plugin's `setup()` function, forcing the plugin to be loaded.
2121
--
2222

2323

0 commit comments

Comments
 (0)