Update
This commit is contained in:
parent
25595e8970
commit
b2499bb16d
44
init.lua
44
init.lua
|
|
@ -115,7 +115,7 @@ vim.opt.showmode = false
|
||||||
-- Remove this option if you want your OS clipboard to remain independent.
|
-- Remove this option if you want your OS clipboard to remain independent.
|
||||||
-- See `:help 'clipboard'`
|
-- See `:help 'clipboard'`
|
||||||
vim.schedule(function()
|
vim.schedule(function()
|
||||||
vim.opt.clipboard = 'unnamedplus'
|
vim.opt.clipboard = 'unnamed'
|
||||||
end)
|
end)
|
||||||
|
|
||||||
-- Enable break indent
|
-- Enable break indent
|
||||||
|
|
@ -456,8 +456,8 @@ require('lazy').setup({
|
||||||
'neovim/nvim-lspconfig',
|
'neovim/nvim-lspconfig',
|
||||||
dependencies = {
|
dependencies = {
|
||||||
-- Automatically install LSPs and related tools to stdpath for Neovim
|
-- Automatically install LSPs and related tools to stdpath for Neovim
|
||||||
{ 'williamboman/mason.nvim', config = true }, -- NOTE: Must be loaded before dependants
|
{ 'mason-org/mason.nvim', config = true }, -- NOTE: Must be loaded before dependants
|
||||||
'williamboman/mason-lspconfig.nvim',
|
'mason-org/mason-lspconfig.nvim',
|
||||||
'WhoIsSethDaniel/mason-tool-installer.nvim',
|
'WhoIsSethDaniel/mason-tool-installer.nvim',
|
||||||
|
|
||||||
-- Useful status updates for LSP.
|
-- Useful status updates for LSP.
|
||||||
|
|
@ -553,7 +553,7 @@ require('lazy').setup({
|
||||||
--
|
--
|
||||||
-- When you move your cursor, the highlights will be cleared (the second autocommand).
|
-- When you move your cursor, the highlights will be cleared (the second autocommand).
|
||||||
local client = vim.lsp.get_client_by_id(event.data.client_id)
|
local client = vim.lsp.get_client_by_id(event.data.client_id)
|
||||||
if client and client.supports_method(vim.lsp.protocol.Methods.textDocument_documentHighlight) then
|
if client and client:supports_method(vim.lsp.protocol.Methods.textDocument_documentHighlight) then
|
||||||
local highlight_augroup = vim.api.nvim_create_augroup('kickstart-lsp-highlight', { clear = false })
|
local highlight_augroup = vim.api.nvim_create_augroup('kickstart-lsp-highlight', { clear = false })
|
||||||
vim.api.nvim_create_autocmd({ 'CursorHold', 'CursorHoldI' }, {
|
vim.api.nvim_create_autocmd({ 'CursorHold', 'CursorHoldI' }, {
|
||||||
buffer = event.buf,
|
buffer = event.buf,
|
||||||
|
|
@ -616,8 +616,27 @@ require('lazy').setup({
|
||||||
local servers = {
|
local servers = {
|
||||||
-- clangd = {},
|
-- clangd = {},
|
||||||
-- gopls = {},
|
-- gopls = {},
|
||||||
pyright = {},
|
-- pyright = {},
|
||||||
-- rust_analyzer = {},
|
-- pylsp = {},
|
||||||
|
--ty = {},
|
||||||
|
--ruff = {},
|
||||||
|
zuban = {},
|
||||||
|
r_language_server = {},
|
||||||
|
rust_analyzer = {
|
||||||
|
['rust_analyzer'] = {
|
||||||
|
settings = {
|
||||||
|
diagnostic = { enable = false },
|
||||||
|
checkOnSave = { enable = false },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
bacon = {},
|
||||||
|
['bacon-ls'] = {
|
||||||
|
init_options = {
|
||||||
|
updateOnSave = true,
|
||||||
|
updateOnSaveWaitMillis = 1000,
|
||||||
|
},
|
||||||
|
},
|
||||||
-- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs
|
-- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs
|
||||||
--
|
--
|
||||||
-- Some languages (like typescript) have entire language plugins that can be useful:
|
-- Some languages (like typescript) have entire language plugins that can be useful:
|
||||||
|
|
@ -667,6 +686,7 @@ require('lazy').setup({
|
||||||
-- by the server configuration above. Useful when disabling
|
-- by the server configuration above. Useful when disabling
|
||||||
-- certain features of an LSP (for example, turning off formatting for ts_ls)
|
-- certain features of an LSP (for example, turning off formatting for ts_ls)
|
||||||
server.capabilities = vim.tbl_deep_extend('force', {}, capabilities, server.capabilities or {})
|
server.capabilities = vim.tbl_deep_extend('force', {}, capabilities, server.capabilities or {})
|
||||||
|
|
||||||
require('lspconfig')[server_name].setup(server)
|
require('lspconfig')[server_name].setup(server)
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
@ -968,3 +988,15 @@ require('lazy').setup({
|
||||||
|
|
||||||
-- The line beneath this is called `modeline`. See `:help modeline`
|
-- The line beneath this is called `modeline`. See `:help modeline`
|
||||||
-- vim: ts=2 sts=2 sw=2 et
|
-- vim: ts=2 sts=2 sw=2 et
|
||||||
|
--
|
||||||
|
|
||||||
|
-- Gopass
|
||||||
|
vim.api.nvim_create_autocmd({ 'BufNewFile', 'BufRead' }, {
|
||||||
|
pattern = '/private/**/gopass**',
|
||||||
|
callback = function()
|
||||||
|
vim.opt_local.swapfile = false
|
||||||
|
vim.opt_local.backup = false
|
||||||
|
vim.opt_local.undofile = false
|
||||||
|
vim.opt_local.shadafile = ''
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ return {
|
||||||
'nvim-neotest/nvim-nio',
|
'nvim-neotest/nvim-nio',
|
||||||
|
|
||||||
-- Installs the debug adapters for you
|
-- Installs the debug adapters for you
|
||||||
'williamboman/mason.nvim',
|
'mason-org/mason.nvim',
|
||||||
'jay-babu/mason-nvim-dap.nvim',
|
'jay-babu/mason-nvim-dap.nvim',
|
||||||
|
|
||||||
-- Add your own debuggers here
|
-- Add your own debuggers here
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue