update
This commit is contained in:
parent
d30f6da1ae
commit
522fe1ae93
50
init.lua
50
init.lua
|
@ -609,6 +609,12 @@ require('lazy').setup({
|
||||||
-- - capabilities (table): Override fields in capabilities. Can be used to disable certain LSP features.
|
-- - capabilities (table): Override fields in capabilities. Can be used to disable certain LSP features.
|
||||||
-- - 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 on_attach_ruff = function(client, bufnr)
|
||||||
|
if client.name == 'ruff' then
|
||||||
|
-- Disable hover in favor of Pyright
|
||||||
|
client.server_capabilities.hoverProvider = false
|
||||||
|
end
|
||||||
|
end
|
||||||
local servers = {
|
local servers = {
|
||||||
-- clangd = {},
|
-- clangd = {},
|
||||||
-- gopls = {},
|
-- gopls = {},
|
||||||
|
@ -623,6 +629,7 @@ require('lazy').setup({
|
||||||
-- tsserver = {},
|
-- tsserver = {},
|
||||||
--
|
--
|
||||||
|
|
||||||
|
-- https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md
|
||||||
lua_ls = {
|
lua_ls = {
|
||||||
-- cmd = {...},
|
-- cmd = {...},
|
||||||
-- filetypes = { ...},
|
-- filetypes = { ...},
|
||||||
|
@ -637,6 +644,7 @@ require('lazy').setup({
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
rust_analyzer = {
|
rust_analyzer = {
|
||||||
checkOnSave = {
|
checkOnSave = {
|
||||||
allFeatures = true,
|
allFeatures = true,
|
||||||
|
@ -651,11 +659,28 @@ require('lazy').setup({
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
ruff_lsp = {
|
-- https://github.com/astral-sh/ruff/blob/main/crates/ruff_server/docs/setup/NEOVIM.md
|
||||||
init_options = {
|
ruff = {
|
||||||
|
-- Disable hover in favor of Pyright
|
||||||
|
on_attach = on_attach_ruff,
|
||||||
|
-- cmd_env = { RUFF_TRACE = 'messages' },
|
||||||
|
},
|
||||||
|
-- https://microsoft.github.io/pyright/#/settings
|
||||||
|
pyright = {
|
||||||
settings = {
|
settings = {
|
||||||
-- Any extra CLI arguments for `ruff` go here.
|
pyright = {
|
||||||
args = {},
|
-- Using Ruff's import organizer
|
||||||
|
disableOrganizeImports = true,
|
||||||
|
},
|
||||||
|
python = {
|
||||||
|
analysis = {
|
||||||
|
-- Ignore all files for analysis to exclusively use Ruff for linting
|
||||||
|
-- ignore = { '*' },
|
||||||
|
autoSearchPaths = true,
|
||||||
|
diagnosticMode = 'openFilesOnly',
|
||||||
|
useLibraryCodeForTypes = true,
|
||||||
|
-- typeCheckingMode = 'strict',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -676,7 +701,8 @@ require('lazy').setup({
|
||||||
html = {},
|
html = {},
|
||||||
jsonls = {},
|
jsonls = {},
|
||||||
tailwindcss = {},
|
tailwindcss = {},
|
||||||
tsserver = {},
|
-- npm install -g @biomejs/biome
|
||||||
|
biome = {},
|
||||||
ltex = {
|
ltex = {
|
||||||
ltex = {
|
ltex = {
|
||||||
additionalRules = {
|
additionalRules = {
|
||||||
|
@ -774,12 +800,12 @@ require('lazy').setup({
|
||||||
-- `friendly-snippets` contains a variety of premade snippets.
|
-- `friendly-snippets` contains a variety of premade snippets.
|
||||||
-- See the README about individual language/framework/plugin snippets:
|
-- See the README about individual language/framework/plugin snippets:
|
||||||
-- https://github.com/rafamadriz/friendly-snippets
|
-- https://github.com/rafamadriz/friendly-snippets
|
||||||
-- {
|
{
|
||||||
-- 'rafamadriz/friendly-snippets',
|
'rafamadriz/friendly-snippets',
|
||||||
-- config = function()
|
config = function()
|
||||||
-- require('luasnip.loaders.from_vscode').lazy_load()
|
require('luasnip.loaders.from_vscode').lazy_load()
|
||||||
-- end,
|
end,
|
||||||
-- },
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
'saadparwaiz1/cmp_luasnip',
|
'saadparwaiz1/cmp_luasnip',
|
||||||
|
@ -802,7 +828,7 @@ require('lazy').setup({
|
||||||
luasnip.lsp_expand(args.body)
|
luasnip.lsp_expand(args.body)
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
completion = { completeopt = 'menu,menuone,noinsert' },
|
completion = { completeopt = 'menu,menuone,noinsert,noselect' },
|
||||||
|
|
||||||
-- For an understanding of why these mappings were
|
-- For an understanding of why these mappings were
|
||||||
-- chosen, you will need to read `:help ins-completion`
|
-- chosen, you will need to read `:help ins-completion`
|
||||||
|
|
Loading…
Reference in New Issue