nix config

add support for starpls-bin??

+10 -132
+4 -3
home/profiles/nvim/config/fnl/conf/lsp.fnl
··· 4 4 (local lspsaga (require :lspsaga)) 5 5 (local cmp (require :cmp)) 6 6 (local nvim (require :lib/nvim)) 7 - ; (local lspfuzzy (require :lspfuzzy)) 7 + ; (local lspfuzzy (require :lspfuzzy)) ; Not available on Nix 8 8 ; (local sg (require :sg)) 9 9 ; (local lsputil (require :lspconfig/util)) 10 10 ; (local navic (require :nvim-navic)) ··· 87 87 :rangeVariableTypes true} 88 88 :on_attach on-attach}) 89 89 90 - (local lsps [:nil_ls :terraform_lsp :fennel_ls :tsserver]) 90 + (local lsps [:nil_ls :terraform_lsp :fennel_ls :tsserver :starbin]) 91 91 (each [index lsp (ipairs lsps)] 92 92 ((. (. lspconfig lsp) :setup) {})) 93 93 94 94 ; null-ls 95 95 (let [null-ls (require :null-ls)] 96 - (null-ls.setup {:sources [;null-ls.builtins.diagnostics.shellcheck 96 + (null-ls.setup {:sources [; TODO fix these 97 + ;null-ls.builtins.diagnostics.shellcheck 97 98 null-ls.builtins.diagnostics.commitlint]})) 98 99 ;null-ls.builtins.diagnostics.jsonlint]})) 99 100 ;(null-ls.builtins.diagnostics.proselint.with {:filetypes ["vimwiki" "mail"]})]}))
+6 -129
home/profiles/nvim/default.nix
··· 1 1 { pkgs, ... }: 2 - # let 3 - # customPlugins = { 4 - # vim-zettel = pkgs.vimUtils.buildVimPlugin { 5 - # name = "vim-zettel"; 6 - # src = pkgs.fetchFromGitHub { 7 - # owner = "michal-h21"; 8 - # repo = "vim-zettel"; 9 - # rev = "929d90eec62e6f693c2702d2b6f76a93f2f1689d"; 10 - # sha256 = "1fzKmknfVlEYwqeXgbKITbb2/PJ023iJyMz6vak3qh4="; 11 - # }; 12 - # }; 13 - # }; 14 - 15 - # Thank god I don't use python anymore 16 - # my-python-packages = python-packages: with python-packages; [ 17 - # # other python packages you want 18 - # ]; 19 - # python-with-my-packages = pkgs.python3.withPackages my-python-packages; 20 - # in 21 - 2 + # TODO Need to find a solution to have my own packages? 3 + # Or at least update to recent versions of the packages I do use in nixpkgs 22 4 { 23 5 home.sessionVariables.EDITOR = "nvim"; 24 6 home.shellAliases = { ··· 47 29 48 30 # extraConfig = '' 49 31 # filetype plugin on 50 - 51 32 # set shortmess+=c 52 33 53 34 # " Pasting ··· 57 38 58 39 # " lua config 59 40 # lua <<EOF 60 - 61 - 62 - 63 - 64 41 # local luasnip = require("luasnip") 65 42 # local lspkind = require("lspkind") 66 43 # local t = function(str) ··· 73 50 74 51 75 52 # -- Setup lspconfig 76 - # require("nvim-navic").setup {} 77 - # local navic = require("nvim-navic") 78 - 79 - # -- lspsaga, code_action lightbulb is annoying 80 - # local saga = require('lspsaga') 81 - # saga.init_lsp_saga({ 82 - # border_style = "rounded", 83 - # code_action_icon = "", 84 - # code_action_num_shortcut = true, 85 - # code_action_lightbulb = { 86 - # enable = false, 87 - # enable_in_insert = false, 88 - # cache_code_action = true, 89 - # sign = true, 90 - # update_time = 150, 91 - # sign_priority = 20, 92 - # virtual_text = false, 93 - # }, 94 - # code_action_keys = { 95 - # quit = 'q', 96 - # exec = '<CR>', 97 - # }, 98 - # -- show outline 99 - # show_outline = { 100 - # win_position = 'right', 101 - # --set special filetype win that outline window split.like NvimTree neotree 102 - # -- defx, db_ui 103 - # auto_enter = true, 104 - # auto_preview = true, 105 - # virt_text = '┃', 106 - # jump_key = 'o', 107 - # -- auto refresh when change buffer 108 - # auto_refresh = true, 109 - # }, 110 - # }) 111 - 112 - # -- fennel-ls doesn't support gps 113 - # lspconfig['fennel-ls'].setup { 114 - # on_attach = function(client, bufnr) 115 - # format.on_attach(client) 116 - # end, 117 - # capabilities = capabilities, 118 - # } 119 - 120 - # -- deprecated pylsp 121 - # -- require('lspconfig').pylsp.setup { 122 - # -- on_attach = function(client, bufnr) 123 - # -- format.on_attach(client) 124 - # -- navic.attach(client, bufnr) 125 - # -- end, 126 - # -- capabilities = capabilities, 127 - # -- settings = { 128 - # -- pylsp = { 129 - # -- configurationSources = { "flake8", "mypy", "black" }, 130 - # -- plugins = { 131 - # -- black = {enabled = true}, 132 - # -- jedi_signature_help = {enabled = true}, 133 - # -- jedi_completion = { include_params = true }, 134 - # -- pylsp_mypy={ enabled = true }, 135 - # -- pycodestyle={ 136 - # -- enabled=true, 137 - # -- ignore={'E501', 'E231'}, 138 - # -- maxLineLength=120, 139 - # -- }, 140 - # -- }, 141 - # -- }, 142 - # -- }, 143 - # -- } 144 - 145 - # -- lualine 146 - # local navic = require("nvim-navic") 147 - # require('lualine').setup { 148 - # options = { theme = 'ayu' }, 149 - # sections = { 150 - # lualine_c = { 151 - # 'filename', { navic.get_location, condition=navic.is_available }, 152 - # }, 153 - # lualine_y = { 154 - # function() 155 - # local msg = 'No Active Lsp' 156 - # local buf_ft = vim.api.nvim_buf_get_option(0, 'filetype') 157 - # local clients = vim.lsp.get_active_clients() 158 - # if next(clients) == nil then 159 - # return msg 160 - # end 161 - # for _, client in ipairs(clients) do 162 - # local filetypes = client.config.filetypes 163 - # if filetypes and vim.fn.index(filetypes, buf_ft) ~= -1 then 164 - # return client.name 165 - # end 166 - # end 167 - # return msg 168 - # end 169 - # }, 170 - # lualine_x = {'filetype'} 171 - # } 172 - # } 173 - 174 - 175 53 # -- zen mode 176 54 # require('zen-mode').setup{ 177 55 # window = { ··· 216 94 # }, 217 95 # } 218 96 # require('twilight').setup{} 219 - 220 - 221 97 # EOF 98 + # ''; 222 99 223 - # ''; 224 100 extraPackages = with pkgs; [ 225 101 # used to compile tree-sitter grammar 226 102 # python-with-my-packages ··· 234 110 gcc 235 111 shellcheck 236 112 proselint 113 + nixfmt 237 114 # statix 238 115 # nodePackages.typescript 239 116 # nodePackages.typescript-language-server 240 117 # luajitPackages.lua-lsp 241 118 fennel-ls 242 - # starpls-bin # TODO find this!! 119 + unstable.starpls-bin 243 120 ]; 244 121 245 122 plugins = with pkgs.vimPlugins; [ ··· 264 141 indent-blankline-nvim 265 142 266 143 # Tree sitter 267 - (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 ])) 144 + (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 ])) 268 145 nvim-treesitter-context 269 146 nvim-treesitter-textobjects 270 147