add support for starpls-bin??

This commit is contained in:
Anish Lakhwara 2024-08-26 23:15:22 -07:00
parent 10f6614348
commit f7d7d75bb3
2 changed files with 10 additions and 132 deletions

View file

@ -4,7 +4,7 @@
(local lspsaga (require :lspsaga)) (local lspsaga (require :lspsaga))
(local cmp (require :cmp)) (local cmp (require :cmp))
(local nvim (require :lib/nvim)) (local nvim (require :lib/nvim))
; (local lspfuzzy (require :lspfuzzy)) ; (local lspfuzzy (require :lspfuzzy)) ; Not available on Nix
; (local sg (require :sg)) ; (local sg (require :sg))
; (local lsputil (require :lspconfig/util)) ; (local lsputil (require :lspconfig/util))
; (local navic (require :nvim-navic)) ; (local navic (require :nvim-navic))
@ -87,13 +87,14 @@
:rangeVariableTypes true} :rangeVariableTypes true}
:on_attach on-attach}) :on_attach on-attach})
(local lsps [:nil_ls :terraform_lsp :fennel_ls :tsserver]) (local lsps [:nil_ls :terraform_lsp :fennel_ls :tsserver :starbin])
(each [index lsp (ipairs lsps)] (each [index lsp (ipairs lsps)]
((. (. lspconfig lsp) :setup) {})) ((. (. lspconfig lsp) :setup) {}))
; null-ls ; null-ls
(let [null-ls (require :null-ls)] (let [null-ls (require :null-ls)]
(null-ls.setup {:sources [;null-ls.builtins.diagnostics.shellcheck (null-ls.setup {:sources [; TODO fix these
;null-ls.builtins.diagnostics.shellcheck
null-ls.builtins.diagnostics.commitlint]})) null-ls.builtins.diagnostics.commitlint]}))
;null-ls.builtins.diagnostics.jsonlint]})) ;null-ls.builtins.diagnostics.jsonlint]}))
;(null-ls.builtins.diagnostics.proselint.with {:filetypes ["vimwiki" "mail"]})]})) ;(null-ls.builtins.diagnostics.proselint.with {:filetypes ["vimwiki" "mail"]})]}))

View file

@ -1,24 +1,6 @@
{ pkgs, ... }: { pkgs, ... }:
# let # TODO Need to find a solution to have my own packages?
# customPlugins = { # Or at least update to recent versions of the packages I do use in nixpkgs
# vim-zettel = pkgs.vimUtils.buildVimPlugin {
# name = "vim-zettel";
# src = pkgs.fetchFromGitHub {
# owner = "michal-h21";
# repo = "vim-zettel";
# rev = "929d90eec62e6f693c2702d2b6f76a93f2f1689d";
# sha256 = "1fzKmknfVlEYwqeXgbKITbb2/PJ023iJyMz6vak3qh4=";
# };
# };
# };
# Thank god I don't use python anymore
# my-python-packages = python-packages: with python-packages; [
# # other python packages you want
# ];
# python-with-my-packages = pkgs.python3.withPackages my-python-packages;
# in
{ {
home.sessionVariables.EDITOR = "nvim"; home.sessionVariables.EDITOR = "nvim";
home.shellAliases = { home.shellAliases = {
@ -47,7 +29,6 @@
# extraConfig = '' # extraConfig = ''
# filetype plugin on # filetype plugin on
# set shortmess+=c # set shortmess+=c
# " Pasting # " Pasting
@ -57,10 +38,6 @@
# " lua config # " lua config
# lua <<EOF # lua <<EOF
# local luasnip = require("luasnip") # local luasnip = require("luasnip")
# local lspkind = require("lspkind") # local lspkind = require("lspkind")
# local t = function(str) # local t = function(str)
@ -73,105 +50,6 @@
# -- Setup lspconfig # -- Setup lspconfig
# require("nvim-navic").setup {}
# local navic = require("nvim-navic")
# -- lspsaga, code_action lightbulb is annoying
# local saga = require('lspsaga')
# saga.init_lsp_saga({
# border_style = "rounded",
# code_action_icon = "",
# code_action_num_shortcut = true,
# code_action_lightbulb = {
# enable = false,
# enable_in_insert = false,
# cache_code_action = true,
# sign = true,
# update_time = 150,
# sign_priority = 20,
# virtual_text = false,
# },
# code_action_keys = {
# quit = 'q',
# exec = '<CR>',
# },
# -- show outline
# show_outline = {
# win_position = 'right',
# --set special filetype win that outline window split.like NvimTree neotree
# -- defx, db_ui
# auto_enter = true,
# auto_preview = true,
# virt_text = '┃',
# jump_key = 'o',
# -- auto refresh when change buffer
# auto_refresh = true,
# },
# })
# -- fennel-ls doesn't support gps
# lspconfig['fennel-ls'].setup {
# on_attach = function(client, bufnr)
# format.on_attach(client)
# end,
# capabilities = capabilities,
# }
# -- deprecated pylsp
# -- require('lspconfig').pylsp.setup {
# -- on_attach = function(client, bufnr)
# -- format.on_attach(client)
# -- navic.attach(client, bufnr)
# -- end,
# -- capabilities = capabilities,
# -- settings = {
# -- pylsp = {
# -- configurationSources = { "flake8", "mypy", "black" },
# -- plugins = {
# -- black = {enabled = true},
# -- jedi_signature_help = {enabled = true},
# -- jedi_completion = { include_params = true },
# -- pylsp_mypy={ enabled = true },
# -- pycodestyle={
# -- enabled=true,
# -- ignore={'E501', 'E231'},
# -- maxLineLength=120,
# -- },
# -- },
# -- },
# -- },
# -- }
# -- lualine
# local navic = require("nvim-navic")
# require('lualine').setup {
# options = { theme = 'ayu' },
# sections = {
# lualine_c = {
# 'filename', { navic.get_location, condition=navic.is_available },
# },
# lualine_y = {
# function()
# local msg = 'No Active Lsp'
# local buf_ft = vim.api.nvim_buf_get_option(0, 'filetype')
# local clients = vim.lsp.get_active_clients()
# if next(clients) == nil then
# return msg
# end
# for _, client in ipairs(clients) do
# local filetypes = client.config.filetypes
# if filetypes and vim.fn.index(filetypes, buf_ft) ~= -1 then
# return client.name
# end
# end
# return msg
# end
# },
# lualine_x = {'filetype'}
# }
# }
# -- zen mode # -- zen mode
# require('zen-mode').setup{ # require('zen-mode').setup{
# window = { # window = {
@ -216,11 +94,9 @@
# }, # },
# } # }
# require('twilight').setup{} # require('twilight').setup{}
# EOF # EOF
# ''; # '';
extraPackages = with pkgs; [ extraPackages = with pkgs; [
# used to compile tree-sitter grammar # used to compile tree-sitter grammar
# python-with-my-packages # python-with-my-packages
@ -234,12 +110,13 @@
gcc gcc
shellcheck shellcheck
proselint proselint
nixfmt
# statix # statix
# nodePackages.typescript # nodePackages.typescript
# nodePackages.typescript-language-server # nodePackages.typescript-language-server
# luajitPackages.lua-lsp # luajitPackages.lua-lsp
fennel-ls fennel-ls
# starpls-bin # TODO find this!! unstable.starpls-bin
]; ];
plugins = with pkgs.vimPlugins; [ plugins = with pkgs.vimPlugins; [
@ -264,7 +141,7 @@
indent-blankline-nvim indent-blankline-nvim
# Tree sitter # Tree sitter
(nvim-treesitter.withPlugins (p: [ p.nix p.clojure p.fennel p.lua p.html p.css p.regex p.supercollider p.beancount p.markdown_inline p.markdown p.glsl p.yaml p.toml p.dockerfile p.json p.go ])) (nvim-treesitter.withPlugins (p: [ p.nix p.clojure p.fennel p.lua p.html p.css p.regex p.supercollider p.beancount p.markdown_inline p.markdown p.glsl p.yaml p.toml p.dockerfile p.json p.go p.starlark ]))
nvim-treesitter-context nvim-treesitter-context
nvim-treesitter-textobjects nvim-treesitter-textobjects