mirror of
https://github.com/itme-brain/nixos.git
synced 2026-03-24 08:39:42 -04:00
Trying one last change
This commit is contained in:
parent
bcfbcce59c
commit
4fff72b08d
2 changed files with 62 additions and 20 deletions
|
|
@ -10,20 +10,62 @@ end)
|
|||
-- When you don't have mason.nvim installed
|
||||
-- You'll need to list the servers installed in your system
|
||||
lsp.setup_servers({
|
||||
'tsserver',
|
||||
'eslint',
|
||||
'hls',
|
||||
'pyright',
|
||||
'nil_ls',
|
||||
'volar',
|
||||
'cssls',
|
||||
'tsserver',
|
||||
'eslint',
|
||||
'hls',
|
||||
'pyright',
|
||||
'nil_ls',
|
||||
'volar',
|
||||
'cssls',
|
||||
'html',
|
||||
'jsonls',
|
||||
'diagnosticls',
|
||||
'lua_ls'
|
||||
'diagnosticls',
|
||||
'lua_ls',
|
||||
'marksman'
|
||||
})
|
||||
|
||||
-- (Optional) Configure lua language server for neovim
|
||||
require('lspconfig').lua_ls.setup(lsp.nvim_lua_ls())
|
||||
|
||||
lsp.setup()
|
||||
|
||||
local cmp = require'cmp'
|
||||
cmp.setup {
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
require('luasnip').lsp_expand(args.body)
|
||||
end,
|
||||
},
|
||||
sources = {
|
||||
{ name = 'nvim_lsp' },
|
||||
{ name = 'luasnip' },
|
||||
-- other sources...
|
||||
},
|
||||
-- other configurations...
|
||||
}
|
||||
|
||||
local luasnip = require'luasnip'
|
||||
|
||||
cmp.setup {
|
||||
-- other configurations...
|
||||
mapping = {
|
||||
['<Tab>'] = cmp.mapping(function(fallback)
|
||||
if vim.fn.pumvisible() == 1 then
|
||||
vim.fn.feedkeys(vim.api.nvim_replace_termcodes('<C-n>', true, true, true), 'n')
|
||||
elseif luasnip.expand_or_jumpable() then
|
||||
vim.fn.feedkeys(vim.api.nvim_replace_termcodes('<Plug>luasnip-expand-or-jump', true, true, true), '')
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { 'i', 's' }),
|
||||
['<S-Tab>'] = cmp.mapping(function(fallback)
|
||||
if vim.fn.pumvisible() == 1 then
|
||||
vim.fn.feedkeys(vim.api.nvim_replace_termcodes('<C-p>', true, true, true), 'n')
|
||||
elseif luasnip.jumpable(-1) then
|
||||
vim.fn.feedkeys(vim.api.nvim_replace_termcodes('<Plug>luasnip-jump-prev', true, true, true), '')
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { 'i', 's' }),
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -66,10 +66,8 @@
|
|||
nodejs
|
||||
gcc
|
||||
|
||||
# Haskell
|
||||
ghc
|
||||
cabal-install
|
||||
haskell-language-server
|
||||
haskellPackages.hoogle
|
||||
cabal2nix
|
||||
|
||||
|
|
@ -77,15 +75,17 @@
|
|||
python311Packages.pip
|
||||
|
||||
# LSPs
|
||||
nodePackages.vscode-langservers-extracted
|
||||
nodePackages.prettier
|
||||
nodePackages.typescript-language-server
|
||||
nodePackages.diagnostic-languageserver
|
||||
nodePackages.volar
|
||||
nodePackages.pyright
|
||||
haskell-language-server
|
||||
nil
|
||||
sumneko-lua-language-server
|
||||
nodePackages.vscode-langservers-extracted
|
||||
nodePackages.prettier
|
||||
nodePackages.typescript-language-server
|
||||
nodePackages.diagnostic-languageserver
|
||||
nodePackages.volar
|
||||
nodePackages.pyright
|
||||
haskell-language-server
|
||||
nil
|
||||
marksman
|
||||
sumneko-lua-language-server
|
||||
|
||||
];
|
||||
|
||||
# PROGRAM CONFIGS
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue