remaking init.lua to fix lsp support
This commit is contained in:
parent
8d1ef972bc
commit
e37a8980b6
File diff suppressed because it is too large
Load Diff
65
init.lua
65
init.lua
|
|
@ -190,6 +190,11 @@ vim.keymap.set('n', '<C-l>', '<C-w><C-l>', { desc = 'Move focus to the right win
|
||||||
vim.keymap.set('n', '<C-j>', '<C-w><C-j>', { desc = 'Move focus to the lower window' })
|
vim.keymap.set('n', '<C-j>', '<C-w><C-j>', { desc = 'Move focus to the lower window' })
|
||||||
vim.keymap.set('n', '<C-k>', '<C-w><C-k>', { desc = 'Move focus to the upper window' })
|
vim.keymap.set('n', '<C-k>', '<C-w><C-k>', { desc = 'Move focus to the upper window' })
|
||||||
|
|
||||||
|
vim.o.confirm = true
|
||||||
|
vim.keymap.set('n', '<leader>e', vim.diagnostic.open_float, { desc = 'Open [E]rror' })
|
||||||
|
vim.keymap.set('v', '>', '>gv')
|
||||||
|
vim.keymap.set('v', '<', '<gv')
|
||||||
|
vim.keymap.set('n', '<leader>tt', '<cmd>TransparentToggle<CR>', { desc = '[T]oggle [T]ransparent' })
|
||||||
-- [[ Basic Autocommands ]]
|
-- [[ Basic Autocommands ]]
|
||||||
-- See `:help lua-guide-autocommands`
|
-- See `:help lua-guide-autocommands`
|
||||||
|
|
||||||
|
|
@ -615,9 +620,10 @@ require('lazy').setup({
|
||||||
-- - settings (table): Override the default settings passed when initializing the server.
|
-- - settings (table): Override the default settings passed when initializing the server.
|
||||||
-- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/
|
-- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/
|
||||||
local servers = {
|
local servers = {
|
||||||
-- clangd = {},
|
clangd = {},
|
||||||
-- gopls = {},
|
gopls = {},
|
||||||
-- pyright = {},
|
pyright = {},
|
||||||
|
jdtls = {},
|
||||||
-- rust_analyzer = {},
|
-- rust_analyzer = {},
|
||||||
-- ... 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
|
||||||
--
|
--
|
||||||
|
|
@ -629,8 +635,8 @@ require('lazy').setup({
|
||||||
--
|
--
|
||||||
|
|
||||||
lua_ls = {
|
lua_ls = {
|
||||||
-- cmd = {...},
|
-- cmd = { ... },
|
||||||
-- filetypes = { ...},
|
-- filetypes = { ... },
|
||||||
-- capabilities = {},
|
-- capabilities = {},
|
||||||
settings = {
|
settings = {
|
||||||
Lua = {
|
Lua = {
|
||||||
|
|
@ -675,6 +681,8 @@ require('lazy').setup({
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
{ 'mfussenegger/nvim-jdtls' },
|
||||||
|
|
||||||
{ -- Autoformat
|
{ -- Autoformat
|
||||||
'stevearc/conform.nvim',
|
'stevearc/conform.nvim',
|
||||||
event = { 'BufWritePre' },
|
event = { 'BufWritePre' },
|
||||||
|
|
@ -839,13 +847,17 @@ require('lazy').setup({
|
||||||
-- change the command in the config to whatever the name of that colorscheme is.
|
-- change the command in the config to whatever the name of that colorscheme is.
|
||||||
--
|
--
|
||||||
-- If you want to see what colorschemes are already installed, you can use `:Telescope colorscheme`.
|
-- If you want to see what colorschemes are already installed, you can use `:Telescope colorscheme`.
|
||||||
'folke/tokyonight.nvim',
|
'rebelot/kanagawa.nvim',
|
||||||
priority = 1000, -- Make sure to load this before all the other start plugins.
|
priority = 1000, -- Make sure to load this before all the other start plugins.
|
||||||
init = function()
|
init = function()
|
||||||
-- Load the colorscheme here.
|
-- Load the colorscheme here.
|
||||||
-- Like many other themes, this one has different styles, and you could load
|
-- Like many other themes, this one has different styles, and you could load
|
||||||
-- any other, such as 'tokyonight-storm', 'tokyonight-moon', or 'tokyonight-day'.
|
require('kanagawa').setup {
|
||||||
vim.cmd.colorscheme 'tokyonight-night'
|
styles = {
|
||||||
|
comments = { italic = false }, -- Disable italics in comments
|
||||||
|
},
|
||||||
|
}
|
||||||
|
vim.cmd.colorscheme 'kanagawa-wave'
|
||||||
|
|
||||||
-- You can configure highlights by doing something like:
|
-- You can configure highlights by doing something like:
|
||||||
vim.cmd.hi 'Comment gui=none'
|
vim.cmd.hi 'Comment gui=none'
|
||||||
|
|
@ -892,6 +904,43 @@ require('lazy').setup({
|
||||||
-- Check out: https://github.com/echasnovski/mini.nvim
|
-- Check out: https://github.com/echasnovski/mini.nvim
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
'xiyaowong/transparent.nvim',
|
||||||
|
groups = {
|
||||||
|
'Normal',
|
||||||
|
'NormalNC',
|
||||||
|
'Comment',
|
||||||
|
'Constant',
|
||||||
|
'Special',
|
||||||
|
'Identifier',
|
||||||
|
'Statement',
|
||||||
|
'PreProc',
|
||||||
|
'Type',
|
||||||
|
'Underlined',
|
||||||
|
'Todo',
|
||||||
|
'String',
|
||||||
|
'Function',
|
||||||
|
'Conditional',
|
||||||
|
'Repeat',
|
||||||
|
'Operator',
|
||||||
|
'Structure',
|
||||||
|
'LineNr',
|
||||||
|
'NonText',
|
||||||
|
'SignColumn',
|
||||||
|
'CursorLine',
|
||||||
|
'CursorLineNr',
|
||||||
|
'StatusLine',
|
||||||
|
'StatusLineNC',
|
||||||
|
'EndOfBuffer',
|
||||||
|
},
|
||||||
|
-- table: additional groups that should be cleared
|
||||||
|
extra_groups = {},
|
||||||
|
-- table: groups you don't want to clear
|
||||||
|
exclude_groups = {},
|
||||||
|
-- function: code to be executed after highlight groups are cleared
|
||||||
|
-- Also the user event "TransparentClear" will be triggered
|
||||||
|
on_clear = function() end,
|
||||||
|
},
|
||||||
{ -- Highlight, edit, and navigate code
|
{ -- Highlight, edit, and navigate code
|
||||||
'nvim-treesitter/nvim-treesitter',
|
'nvim-treesitter/nvim-treesitter',
|
||||||
build = ':TSUpdate',
|
build = ':TSUpdate',
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue