Small improvements

This commit is contained in:
MDS
2026-01-04 18:51:30 +01:00
parent bcabc31c48
commit b9f2867d9f
5 changed files with 56 additions and 1 deletions

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
spell/*

12
.luarc.json Normal file
View File

@@ -0,0 +1,12 @@
{
"runtime.version": "LuaJIT",
"runtime.path": [
"lua/?.lua",
"lua/?/init.lua"
],
"diagnostics.globals": ["vim"],
"workspace.checkThirdParty": false,
"workspace.library": [
"$VIMRUNTIME"
]
}

35
after/lsp/lsp_ls.lua Normal file
View File

@@ -0,0 +1,35 @@
-- ┌────────────────────┐
-- │ LSP config example │
-- └────────────────────┘
--
-- This file contains configuration of 'lua_ls' language server.
-- Source: https://github.com/LuaLS/lua-language-server
--
-- It is used by `:h vim.lsp.enable()` and `:h vim.lsp.config()`.
-- See `:h vim.lsp.Config` and `:h vim.lsp.ClientConfig` for all available fields.
--
-- This config is designed for Lua's activity around Neovim. It provides only
-- basic config and can be further improved.
return {
on_attach = function(client, buf_id)
-- Reduce very long list of triggers for better 'mini.completion' experience
client.server_capabilities.completionProvider.triggerCharacters =
{ '.', ':', '#', '(' }
-- Use this function to define buffer-local mappings and behavior that depend
-- on attached client or only makes sense if there is language server attached.
end,
-- LuaLS Structure of these settings comes from LuaLS, not Neovim
settings = {
Lua = {
-- Define runtime properties. Use 'LuaJIT', as it is built into Neovim.
runtime = { version = 'LuaJIT', path = vim.split(package.path, ';') },
workspace = {
-- Don't analyze code from submodules
ignoreSubmodules = true,
-- Add Neovim's methods for easier code writing
library = { vim.env.VIMRUNTIME },
},
},
},
}

View File

@@ -170,6 +170,8 @@ xmap_leader('lf', formatting_cmd, 'Format selection')
nmap_leader('or', '<Cmd>lua MiniMisc.resize_window()<CR>', 'Resize to default width')
nmap_leader('ot', '<Cmd>lua MiniTrailspace.trim()<CR>', 'Trim trailspace')
nmap_leader('oz', '<Cmd>lua MiniMisc.zoom()<CR>', 'Zoom toggle')
nmap_leader('om', '<Cmd>Mason<CR>', 'Open Mason')
nmap_leader('ou', '<Cmd>DepsUpdate<CR>', 'Update plugins')
-- s is for 'Session'. Common usage:
-- - `<Leader>sn` - start new session

View File

@@ -37,6 +37,11 @@ now_if_args(function()
'lua',
'vimdoc',
'markdown',
'yaml',
'toml',
'python',
'javascript',
'typst',
-- Add here more languages with which you want to use tree-sitter
-- To see available languages:
-- - Execute `:=require('nvim-treesitter').get_available()`
@@ -76,8 +81,8 @@ now_if_args(function()
-- Use `:h vim.lsp.config()` or 'after/lsp/' directory to configure servers.
-- Uncomment and tweak the following `vim.lsp.enable()` call to enable servers.
vim.lsp.enable({
-- -- For example, if `lua-language-server` is installed, use `'lua_ls'` entry
'lua_ls',
'basedpyright',
})
end)