-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit.lua
More file actions
59 lines (52 loc) · 1.86 KB
/
Copy pathinit.lua
File metadata and controls
59 lines (52 loc) · 1.86 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
vim.g.mapleader = ' '
vim.g.maplocalleader = ' '
vim.g.loaded_netrwPlugin = 0
-- Ensure Mason-managed binaries (e.g. tree-sitter-cli) are visible to child processes
vim.env.PATH = vim.fn.stdpath 'data' .. '/mason/bin:' .. vim.env.PATH
-- nvim 0.12 compat: older plugins still call the removed ft_to_lang helper.
vim.treesitter.language.ft_to_lang = vim.treesitter.language.ft_to_lang or vim.treesitter.language.get_lang
-- nvim 0.12 compat: make_position_params now requires offset_encoding explicitly.
-- Plugins like telescope that were written before this change trigger the warning.
-- This shim restores the old defaulting behaviour transparently.
local _orig_make_position_params = vim.lsp.util.make_position_params
vim.lsp.util.make_position_params = function(window, offset_encoding)
if not offset_encoding then
local buf = vim.api.nvim_win_get_buf(window or 0)
local clients = vim.lsp.get_clients { bufnr = buf }
offset_encoding = (clients[1] or {}).offset_encoding or 'utf-16'
end
return _orig_make_position_params(window, offset_encoding)
end
vim.opt.spell = true
vim.opt.spelllang = 'en_gb'
vim.opt.shiftwidth = 4
vim.opt.softtabstop = 4
vim.opt.tabstop = 2
require 'config.options'
require 'config.autocmds'
require 'config.commands'
require('lazy').setup('plugins', {
change_detection = {
notify = false,
},
ui = {
-- If you are using a Nerd Font: set icons to an empty table which will use the
-- default lazy.nvim defined Nerd Font icons, otherwise define a unicode icons table
icons = vim.g.have_nerd_font and {} or {
cmd = '⌘',
config = '🛠',
event = '📅',
ft = '📂',
init = '⚙',
keys = '🗝',
plugin = '🔌',
runtime = '💻',
require = '🌙',
source = '📄',
start = '🚀',
task = '📌',
lazy = '💤 ',
},
},
})
require 'config.keymaps'