Compare commits
5 Commits
feature/La
...
develop
Author | SHA1 | Date |
---|---|---|
Paul Stemmet | e0e3d72e8e | |
Paul Stemmet | ac705ce937 | |
Paul Stemmet | 38568df712 | |
Paul Stemmet | afaf382e25 | |
Paul Stemmet | 7724f3d086 |
|
@ -4,18 +4,22 @@ local M, S = {}, {}
|
|||
|
||||
---Toggle the line numbers and diagnostic gutter
|
||||
function M.ToggleGutter()
|
||||
local o = vim.opt
|
||||
local o, diagnostic = vim.opt, vim.diagnostic
|
||||
|
||||
if o.number:get() then
|
||||
S.signcolumn = o.signcolumn:get()
|
||||
o.number = false
|
||||
o.relativenumber = false
|
||||
o.signcolumn = 'no'
|
||||
diagnostic.enable(false)
|
||||
else
|
||||
o.number = true
|
||||
o.relativenumber = true
|
||||
o.signcolumn = S.signcolumn or 'yes:1'
|
||||
diagnostic.enable(true)
|
||||
end
|
||||
|
||||
vim.cmd 'IBLToggle'
|
||||
end
|
||||
|
||||
---Open a float with your local config files
|
||||
|
|
|
@ -48,7 +48,9 @@ M.Python = core.preset('pyright', 'lazyvim.plugins.extras.lang.python', core.lsp
|
|||
M.Rust = core.preset('rust-analyzer', 'lazyvim.plugins.extras.lang.rust', function(server, opts)
|
||||
return {
|
||||
'mrcjkb/rustaceanvim',
|
||||
opts = { default_settings = core.make_server(server, opts.settings) }
|
||||
opts = {
|
||||
server = { default_settings = { [server] = opts.settings } }
|
||||
}
|
||||
}
|
||||
end)
|
||||
|
||||
|
|
|
@ -144,8 +144,12 @@ return {
|
|||
|
||||
-- CSpell setup
|
||||
local cspell = require 'cspell'
|
||||
local cspell_config_json = function(_)
|
||||
return vim.fn.stdpath('config') .. '/cspell.json'
|
||||
end
|
||||
local cspell_opts = {
|
||||
config = {
|
||||
find_json = cspell_config_json,
|
||||
on_add_to_json = function(payload)
|
||||
if vim.fn.executable('jq') == 0 then return end
|
||||
|
||||
|
@ -172,6 +176,12 @@ return {
|
|||
end,
|
||||
}
|
||||
|
||||
-- Ensure our config file exists, otherwise cspell complains
|
||||
local uv = (vim.uv or vim.loop);
|
||||
if not uv.fs_stat(cspell_config_json()) then
|
||||
vim.fn.writefile({'{}'}, cspell_config_json())
|
||||
end
|
||||
|
||||
opts.sources = vim.tbl_extend('force', opts.sources or {}, {
|
||||
cspell.diagnostics.with(cspell_opts),
|
||||
cspell.code_actions.with(cspell_opts),
|
||||
|
|
Loading…
Reference in New Issue