mirror of
https://github.com/Gerg-L/nixos.git
synced 2025-12-10 00:43:56 -05:00
neovim reconfiguration
and configuring st
This commit is contained in:
parent
b4ea6ab031
commit
532ae0d63e
14 changed files with 783 additions and 118 deletions
24
home-manager/neovim/config/lspconfig.lua
Normal file
24
home-manager/neovim/config/lspconfig.lua
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
local lspc = require'lspconfig'
|
||||
|
||||
local buf_map = function(bufnr, mode, lhs, rhs, opts)
|
||||
vim.api.nvim_buf_set_keymap(bufnr, mode, lhs, rhs, opts or {
|
||||
silent = true,
|
||||
})
|
||||
end
|
||||
|
||||
lspc.tsserver.setup({
|
||||
on_attach = function(client, bufnr)
|
||||
client.resolved_capabilities.document_formatting = false
|
||||
client.resolved_capabilities.document_range_formatting = false
|
||||
local ts_utils = require("nvim-lsp-ts-utils")
|
||||
|
||||
ts_utils.setup({})
|
||||
ts_utils.setup_client(client)
|
||||
|
||||
buf_map(bufnr, "n", "gs", ":TSLspOrganize<CR>")
|
||||
buf_map(bufnr, "n", "gi", ":TSLspRenameFile<CR>")
|
||||
buf_map(bufnr, "n", "go", ":TSLspImportAll<CR>")
|
||||
|
||||
on_attach(client, bufnr)
|
||||
end,
|
||||
})
|
||||
Loading…
Add table
Add a link
Reference in a new issue